import serial import time from time import sleep # configure the serial connections ser = serial.Serial( port='/dev/tty.usbserial', baudrate=115200, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, bytesize=serial.EIGHTBITS, timeout=0) # open the serial port if ser.isOpen(): print(ser.name + ' is open...') while True: data = ser.read(99) if len(data) > 0: print(data) sleep(10.0) print ('checking') ser.close()