✨
This commit is contained in:
12
square.py
12
square.py
@ -10,6 +10,15 @@ RIGHT_WHEEL_OFFSET = 4
|
|||||||
|
|
||||||
CLOCKWISE_OFFSET = 0.82
|
CLOCKWISE_OFFSET = 0.82
|
||||||
|
|
||||||
|
def wiggle(arlo):
|
||||||
|
arlo.go_diff(50, 53, 1, 0)
|
||||||
|
sleep(TURN_T * CLOCKWISE_OFFSET * 2)
|
||||||
|
arlo.stop()
|
||||||
|
sleep(0.3)
|
||||||
|
arlo.go_diff(50, 53, 0, 1)
|
||||||
|
sleep(TURN_T * 2)
|
||||||
|
arlo.stop()
|
||||||
|
|
||||||
def clockwise_square(arlo):
|
def clockwise_square(arlo):
|
||||||
arlo.go_diff(POWER, POWER + RIGHT_WHEEL_OFFSET, 0, 1)
|
arlo.go_diff(POWER, POWER + RIGHT_WHEEL_OFFSET, 0, 1)
|
||||||
sleep(TURN_T * 0.5)
|
sleep(TURN_T * 0.5)
|
||||||
@ -36,6 +45,9 @@ def clockwise_square(arlo):
|
|||||||
|
|
||||||
sleep(1)
|
sleep(1)
|
||||||
|
|
||||||
|
for _ in range(6):
|
||||||
|
wiggle(arlo)
|
||||||
|
|
||||||
def counter_square(arlo):
|
def counter_square(arlo):
|
||||||
arlo.go_diff(POWER, POWER + RIGHT_WHEEL_OFFSET, 0, 1)
|
arlo.go_diff(POWER, POWER + RIGHT_WHEEL_OFFSET, 0, 1)
|
||||||
sleep(TURN_T * 0.5)
|
sleep(TURN_T * 0.5)
|
||||||
|
Reference in New Issue
Block a user