This commit is contained in:
2024-12-25 22:03:34 +01:00
parent 6070b4ce2e
commit b8dd3bb6f9

View File

@@ -8,7 +8,7 @@ kit = ServoKit(channels=16)
# Constants for delay
DELAY = 1
# Angle configuration for each servo
# front/up back/down neutral
SERVO_ANGLES = {
0: (0, 110, 90),
1: (0, 110, 90),
@@ -46,6 +46,8 @@ def move_leg(servo1, servo2):
kit.servo[servo1].angle = neutral1
print(f"Servo {servo1} set to NEUTRAL angle: {neutral1}")
time.sleep(DELAY)
kit.servo[servo2].angle = neutral2
print(f"Servo {servo2} set to NEUTRAL angle: {neutral2}")