コード例 #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
コード例 #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)
コード例 #3
0
def moveForward(dist):
    return comm('mf', dist)
コード例 #4
0
def turnRight(angle_dist):
    return comm('tr', angle_dist)
コード例 #5
0
def turnLeft(angle_dist):
    return comm('tl', angle_dist)
コード例 #6
0
def getSensorData():
    return comm('gsd')