def recvByte():
i = tty.read()
- while len(i)==0:
- time.sleep(0.03)
- i = tty.read()
return ord(i)
def sendByte(byte):
print "Initializing serial port..."
-tty = SerialPort(DEVICE, 0, KERNEL_BAUDRATE)
+tty = SerialPort(DEVICE, None, KERNEL_BAUDRATE)
# check command line arguments
if len(sys.argv) != 2: