Let's say I am connecting 2 Arduino boards to the computer and I want to use Johnny-five here. Each of boards is used to different tasks, for example one reads sensors, the other controls some LEDs. So it is important to me to read/write signals to appropriate boards.
I am looking for some flexibility here, because I found out that:
Here I don't know which board got key A and which B, and I can't guarantee that keys will not be opposite when I connect my arduinos to another machine:
new five.Boards([ "A", "B" ]);
Here I know exactly which board is connected to which port, but I can't hardcode it if I am planning to connect boards to another machine:
new five.Boards([ "/dev/cu.usbmodem621", "/dev/cu.usbmodem411" ]);
The only idea I have for now is to use a kind of jumpers, by wiring for example pin10 to +5V on board 1, and to the ground on board 2, or even use resistors and have many signal levels (if I plan to connect more boards), then probe the pin and just get info which board I am connected to and assign it to A or B in the array. After that I would run the main code with my program.
My question is: Do you see any other approach giving you guarantee that you "talk" to correct board?