예제 #1
0
def main_test():
    toio = Toio(_get_ta_addr())
    if toio.is_connected():
        toio.back()
        toio.disconnect()
예제 #2
0
def main_steps():
    toio = Toio(_get_ta_addr())
    if toio.is_connected():
        toio.straight()
        toio.turn_right()
        toio.back()
        toio.spin_turn_180()
        toio.disconnect()
예제 #3
0
def main_user_input():
    toio = Toio(_get_ta_addr())
    if toio.is_connected():
        print("w: UP, a: TURN LEFT, d: TURN RIGHT, x: BACK, SHIFT+C: exit")
        while True:
            with ReadChar() as rc:
                char = rc
            if char == 'w':
                toio.straight()
            elif char == 'a':
                toio.turn_left()
            elif char == 'd':
                toio.turn_right()
            elif char == 'x':
                toio.back()
            if char in "^C":
                break
        toio.disconnect()
예제 #4
0
def main():
    toio = Toio(_get_ta_addr())
    if toio.is_connected():
        toio.request_data(UUID_NAME)
        toio.straight()
        toio.disconnect()