Beispiel #1
0
def main():
    command = ''
    while command != 'q':  #exit the loop by typing 'q'
        command = input("\nEnter bot command: ")
        if command != 'q':
            comm(command)
    return
Beispiel #2
0
def rotateR90():
    track_width = 9.4  #cm
    d_angle = 90
    dist = (d_angle / 360) * (track_width * math.pi)
    dist = dist * 100  #multiplied to retain two decimal points, will be divided on the Tiva side
    dist = int(dist)
    return comm('tr', dist)
Beispiel #3
0
def moveForward(dist):
    return comm('mf', dist)
Beispiel #4
0
def turnRight(angle_dist):
    return comm('tr', angle_dist)
Beispiel #5
0
def turnLeft(angle_dist):
    return comm('tl', angle_dist)
Beispiel #6
0
def getSensorData():
    return comm('gsd')