a
This commit is contained in:
@@ -7,6 +7,7 @@ kit = ServoKit(channels=16)
|
|||||||
# Constants for angles
|
# Constants for angles
|
||||||
ANGLE_START = 0
|
ANGLE_START = 0
|
||||||
ANGLE_MIDDLE = 110
|
ANGLE_MIDDLE = 110
|
||||||
|
ANGLE_INITIAL = 55
|
||||||
|
|
||||||
# Constants for delay
|
# Constants for delay
|
||||||
DELAY = 1
|
DELAY = 1
|
||||||
@@ -21,6 +22,10 @@ def move_leg_with_prompt(leg, angle):
|
|||||||
# Main function
|
# Main function
|
||||||
def main():
|
def main():
|
||||||
legs = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
|
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:
|
while True:
|
||||||
for leg in legs:
|
for leg in legs:
|
||||||
move_leg_with_prompt(leg, ANGLE_START)
|
move_leg_with_prompt(leg, ANGLE_START)
|
||||||
|
|||||||
Reference in New Issue
Block a user