✨
This commit is contained in:
@ -4,7 +4,7 @@ import robot
|
||||
DRIVE_A = 5.3 # 10 degrees turn at power 1
|
||||
TURN_A = 16 # 10 centimeter drive at power 1
|
||||
|
||||
RIGHT_WHEEL_OFFSET = 4
|
||||
RIGHT_WHEEL_OFFSET = 0
|
||||
|
||||
def square(arlo, power, turn_t, drive_t):
|
||||
while True:
|
||||
@ -16,7 +16,7 @@ def square(arlo, power, turn_t, drive_t):
|
||||
sleep(1)
|
||||
|
||||
# Turning 90 degrees
|
||||
arlo.go_diff(power, power + RIGHT_WHEEL_OFFSET, 1, 0)
|
||||
arlo.go_diff(power, power + RIGHT_WHEEL_OFFSET, 0, 1)
|
||||
sleep(turn_t * 9)
|
||||
arlo.stop()
|
||||
|
||||
|
@ -18,7 +18,7 @@ def main():
|
||||
# Initializes the robot and runs the
|
||||
arlo = robot.Robot()
|
||||
|
||||
arlo.go_diff(power, power, 1, 0)
|
||||
arlo.go_diff(power, power, 0, 1)
|
||||
sleep(turn_t * 36)
|
||||
arlo.stop()
|
||||
|
||||
|
Reference in New Issue
Block a user