You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
item-sort/control_motor.py

10 lines
222 B
Python

import math
def goToBin(bin):
if bin % 2 == 0:
direction = "right"
else:
direction = "left"
adjustedBin = math.floor(bin / 2)
distance = adjustedBin * 18
time = 0.5 + 0.93 * adjustedBin