Last active
December 13, 2024 11:06
-
-
Save maxpromer/31dd106a2ad0284cc2a179920e5dfcb3 to your computer and use it in GitHub Desktop.
ArtronShop Servo HAT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import PCA9685 | |
import time | |
servo = PCA9685.PCA9685(address=0x40) # defaults to bus 1, address 0x40 | |
while True: | |
servo.set_angle(-1, 0) | |
time.sleep(2) | |
servo.set_angle(-1, 45) | |
time.sleep(2) | |
servo.set_angle(-1, 90) | |
time.sleep(2) | |
servo.set_angle(-1, 135) | |
time.sleep(2) | |
servo.set_angle(-1, 180) | |
time.sleep(2) | |
servo.cancel() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment