✨
This commit is contained in:
@ -1,8 +1,8 @@
|
|||||||
from time import sleep
|
from time import sleep
|
||||||
import robot
|
import robot
|
||||||
|
|
||||||
DRIVE_A = 5.3 # 10 degrees turn at power 1
|
TURN_A = 5.3 # 10 degrees turn at power 1
|
||||||
TURN_A = 16 # 10 centimeter drive at power 1
|
DRIVE_A = 16 # 10 centimeter drive at power 1
|
||||||
|
|
||||||
RIGHT_WHEEL_OFFSET = 4
|
RIGHT_WHEEL_OFFSET = 4
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
from time import sleep
|
from time import sleep
|
||||||
import robot
|
import robot
|
||||||
|
|
||||||
DRIVE_A = 5.3 # 10 degrees turn at power 1
|
TURN_A = 5.3 # 10 degrees turn at power 1
|
||||||
TURN_A = 16 # 10 centimeter drive at power 1
|
TURN_COUNTER_OFFSET = 1.042
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
# Gets the power for the robot
|
# Gets the power for the robot
|
||||||
@ -20,13 +20,13 @@ def main():
|
|||||||
offset = int(offset)
|
offset = int(offset)
|
||||||
|
|
||||||
# Calculates sleep times for the robot
|
# Calculates sleep times for the robot
|
||||||
turn_t = DRIVE_A / power # 10 degrees turn at given power
|
turn_t = 0.076 # 10 degrees turn at given power
|
||||||
|
|
||||||
# Initializes the robot and runs the
|
# Initializes the robot and runs the
|
||||||
arlo = robot.Robot()
|
arlo = robot.Robot()
|
||||||
|
|
||||||
arlo.go_diff(power, power + offset, 0, 1)
|
arlo.go_diff(power, power + offset, 0, 1)
|
||||||
sleep(turn_t * 36)
|
sleep(turn_t * 36 * TURN_COUNTER_OFFSET)
|
||||||
|
|
||||||
arlo.stop()
|
arlo.stop()
|
||||||
sleep(1)
|
sleep(1)
|
||||||
|
Reference in New Issue
Block a user