Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4906

Beginners • Re: Pan and Tilt

$
0
0
By altering min_pulse and max pulse I got it to work
but now Adafruit tell me it shouln't be run direct from the gpio pins and that I need to buy a hat.
Nowhere on the Pi Hut did it mention this when I bought the kit.

Code:

from gpiozero import AngularServofrom time import sleep#servo = AngularServo(17, min_pulse_width=0.0006, max_pulse_width=0.0023)servo = AngularServo(17, min_pulse_width=0.0005 , max_pulse_width=0.0024)while (True):    servo.angle = 90    sleep(10)    servo.angle = 0    sleep(5)    servo.angle = -90    sleep(5)

Statistics: Posted by TamsPi — Wed Feb 07, 2024 11:19 am



Viewing all articles
Browse latest Browse all 4906

Trending Articles