Raspberry Pi - PWM Output
What is wrong with this code snippet for servo control?
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(23, GPIO.OUT)
pwm = GPIO.PWM(23, 50)
pwm.start(5)
pwm.ChangeDutyCycle(20)
pwm.stop()
GPIO.cleanup()
15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions