Hello everyone, I coded my servo but it only shakes, can you help me please? here is the code
Code:
import RPi.GPIO as GPIOimport timeservoPIN = 13GPIO.setmode(GPIO.BCM) GPIO.setup(servoPIN, GPIO.OUT)p = GPIO.PWM(servoPIN, 50) # GPIO 17 for PWM with 50Hzp.start(2.5) # Initializationtry: while True: p.ChangeDutyCycle(6) time.sleep(10) except KeyboardInterrupt: p.stop() GPIO.cleanup()
Statistics: Posted by ysk05 — Fri Feb 02, 2024 7:41 pm — Replies 1 — Views 60