import serial
import time
import struct
ser = serial.Serial('COM181', 115200, timeout=0)

message = struct.pack(">bb", - ord('N'), 0)
ser.write(message)
reply = ser.read()
while len(reply) < 16: # Each sensor is 2 bytes.
	reply += ser.read()
reply = struct.unpack('@HHHHHHHH', reply)
print("prox: " + str(reply[0]) + ", " + str(reply[1]) + ", " + str(reply[2]) + ", " + str(reply[3]) + ", " + str(reply[4]) + ", " + str(reply[5]) + ", " + str(reply[6]) + ", " + str(reply[7]))

ser.close()

