hii all
I am new user in Rpi environment i was trying to work with servomotor but its not working just give me possible way how to test all that stuff.
i am using rpi B+ model with raspbian os
Code: Select all
require 'wiringpi'
io = WiringPi::GPIO.new
io.mode(1, PWM_OUTPUT)
puts "starting.."
io.pwmWrite(1,500) #start motor
puts "sleeping"
sleep(1)
puts "stopping.."
io.pwmWrite(1,0)