'''
Program: readSerial.py
Author: Joe Pitz
Description:

reads the serial port and prints out the
direction the robot is turning.
go forward, turn right, turn left.

'''

import serial
import time

def main():
    # declare and initialize array

    ser = serial.Serial('COM3', 1200, timeout=0)
    while 1:
        value = ser.read(1)
        if value >= '0' and value <= '3':
            if value == '0' or value == '3':
                print "Go Forward"
            if value == '1':
                print "Turn Left"
            if value == '2':
                print "Turn Right"                    
    

if __name__ == "__main__":
    main()