a
This commit is contained in:
4
walk.py
4
walk.py
@@ -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}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user