Open wchill opened 7 years ago
Code to acquire the hardware ID has been merged in #10 (at least the code from the Teensy side). In order to request the hardware ID, this Python code can be used:
import serial
port = serial.Serial('/dev/ttyACM0', 460800)
port.write(b'\xDE\xAD\xBE\xEF\x00')
id = port.read(4)
print(id)
To enumerate available serial ports, we can use this code: http://stackoverflow.com/a/33664096
Mapping to hardware ID is not feasible with the current Arduino Uno setup and cannot be completed until the Teensy LCs arrive, but when they do, this forum thread has information on obtaining a MAC from the connected Teensy: https://forum.pjrc.com/threads/25522-Serial-Number-of-Teensy-3-1
The goal is to be able to detect which/how many panels are networked without having to hardcode serial ports on each Raspberry Pi as serial port device files may change.