I want to press a small button with a servo
2016/03/08 It still works, but it may or may not work due to insufficient current, so it is not recommended for purposes other than a little movement as a trial. I was sick (≧ F ≦). I will organize it in another article.
--SG-90 Akizuki Denshi --Jumpa Male-Mess
from RPIO import PWM
import time
servo = PWM.Servo()
SERVO_X = 23
# 0
servo.set_servo(SERVO_X, 1500)
time.sleep(1)
# -90
servo.set_servo(SERVO_X, 400)
time.sleep(1)
# 0
servo.set_servo(SERVO_X, 1500)
time.sleep(1)
servo.stop_servo(SERVO_X)
I feel that the servo motor does not move exactly to 0 °, 90 °, and -90 ° even if I intend to do it according to the specifications. I'm not sure where 0 ° is in the first place, and I wonder if a servo motor is such a thing.
I thought it was okay in terms of electric current, but there was no problem.
Recommended Posts