This commit is contained in:
2024-12-25 13:25:37 +01:00
parent 33746aeab6
commit fd3796758a

View File

@@ -7,6 +7,7 @@ kit = ServoKit(channels=16)
# Constants for angles
ANGLE_START = 0
ANGLE_MIDDLE = 110
ANGLE_INITIAL = 55
# Constants for delay
DELAY = 1
@@ -21,6 +22,10 @@ def move_leg_with_prompt(leg, angle):
# Main function
def main():
legs = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
print("Moving all legs to the initial position (55 degrees).")
for leg in legs:
move_leg_with_prompt(leg, ANGLE_INITIAL)
while True:
for leg in legs:
move_leg_with_prompt(leg, ANGLE_START)