Retrieve a unique stable ID number from an Arduino

I’m using LibSerialPort.jl to communicate with an Arduino. I have 5 Arduinos connected at the same time, and I’d like to have a robust way of identifying which is which (regardless or restarts or switching the cables).

Right now I’ve programmed each Arduino to return an individual ID I manually assigned it (when queried for it). But I’m wondering if there is a way (using LibSerialPort.jl) to retrieve some such on-board ID number? This would save an if-statement on the Arduinos and this manual setting up.

Slightly related, does anyone know if it’s possible to programmatically load sketches to an arduino “from Julia” (on Linux)? This too would facilitate the process since I’d then be able to first load individual sketches with individual ID numbers (all programmatically generated) when setting up this whole thing.

Maybe related:

(apologies if you’ve seen these already)

1 Like

Yea… No worries. There isn’t much there in terms of how to do it from Julia. My current work around works though.