turn_test.py
This commit is contained in:
10
square.py
10
square.py
@ -27,24 +27,28 @@ def clockwise_square(arlo):
|
||||
sleep(1)
|
||||
|
||||
def counter_square(arlo):
|
||||
arlo.go_diff(POWER, POWER + RIGHT_WHEEL_OFFSET, 0, 1)
|
||||
sleep(TURN_T * 0.5)
|
||||
arlo.stop()
|
||||
|
||||
for _ in range(4):
|
||||
# Driving forward
|
||||
arlo.go_diff(POWER, POWER + RIGHT_WHEEL_OFFSET, 1, 1)
|
||||
sleep(DRIVE_T * 10)
|
||||
arlo.stop()
|
||||
|
||||
sleep(1)
|
||||
sleep(0.5)
|
||||
|
||||
# Turning 90 degrees
|
||||
arlo.go_diff(POWER, POWER + RIGHT_WHEEL_OFFSET, 0, 1)
|
||||
sleep(TURN_T * 10)
|
||||
arlo.stop()
|
||||
sleep(0.5)
|
||||
sleep(0.2)
|
||||
arlo.go_diff(POWER, POWER + RIGHT_WHEEL_OFFSET, 1, 0)
|
||||
sleep(TURN_T)
|
||||
arlo.stop()
|
||||
|
||||
sleep(1)
|
||||
sleep(0.5)
|
||||
|
||||
def main():
|
||||
# Initializes the robot and runs the
|
||||
|
Reference in New Issue
Block a user