diff --git a/motors/main.py b/motors/main.py index fa95a0a..98ef06f 100644 --- a/motors/main.py +++ b/motors/main.py @@ -84,7 +84,9 @@ def look_right(pause=1): def all_move(pause=1): - moves = (tip_forward, tip_back, lean_left, lean_right, look_left, look_right, turn_left, turn_right, turn_right, turn_left) + moves = ( + tip_forward, tip_back, lean_left, lean_right, look_left, look_right, fall, wave, turn_left, turn_right, turn_right, + turn_left) for move in moves: move(pause=pause) time.sleep(0.5) @@ -153,4 +155,25 @@ def turn_right(pause=None): init_legs() +def wave(pause=None, times=3): + counter = times + while counter: + servos.position(7, 180) + time.sleep(0.1) + servos.position(7, 160) + time.sleep(0.1) + counter -= 1 + servos.position(7, 90) + init_legs() + + +def fall(pause=1): + servos.position(3, 160) + servos.position(1, 30) + servos.position(5, 30) + servos.position(7, 160) + time.sleep(pause) + init_legs() + + init_legs()