I am using custom targets for a laser tag game. I have 4 teams, each represented by a color. Each target has an Arduino Nano to drive the IR receiver and RGB LED display to indicate what team hit the target last and what team has the most damage points on it.
When a team weapon hits a target it flashes the color of the team and then displays the highest scoring team color for that target. Points are stored in an array.
some targets are stationary and others pop up for a certain amount of time. The ones that pop up will have the score reset every time (so that the display will revert to no LED) but the score will be accumulated on another array
I will have 16 targets and want to display the combined score of all targets on 4 separate LED Displays
I have the targets working fine but have no idea how to connect all the Nanos to one Arduino to display the 4 accumulated team scores.
I want to use 4 - TM1637 4 Digit 7 Segment Displays w/I2C, Red, Green, Blue, and Yellow.
How can I connect all 16 Nanos to the one Arduino to drive the LED displays? Can i use i2c to have the Uno poll each nano and have them send the data?
Between 2 nodes or max? Still 6 feet / 2m is A LOT for I2C to span.
RS485 is a cheap option for lengths. And if you use low bitrates (I2C is slow as well) you can get away with making more organic bus structures then a single ling bus structure.
I have found some diagrams for connecting it, basically A to a B to B and termination resistors
I have no idea how to write the protocols for multi-node RS485 communication.
I have found several examples of 2 Arduinos sending a byte back and forth.
From what I understand RS485 is HALF-DUPLEX across a shared single pair of twisted wires (A+B). All devices are simply connected to the same pair of wires. Therefore only ONE device can TRANSMIT at a time... and all the other devices must be listening (receiving).
There can be no simultaneous communications otherwise, the 2 transmitters would fight each other on the shared wires and no data would be correctly received by any device.
I have no idea how to write the protocols for multi-node RS485 communication.
I have found several examples of 2 Arduinos sending a byte back and forth. I need the one unit to poll the others one at a time and then each to send their data that the "Master" (for lack of a better term here) can read and use. I only need to have each target send a numerical value between 0 and 500.
I am still searching and reading but could use some help pointing me in the right direction.
DAMN forum! The Preview button now posts instead of previewing :s
Yes I meant RS45
And yeas, it's half duplex if you use 2 wires but full duplex if you use 4.
RS485 is only electrical and is typically used with serial which has no protocol. Aka, you have to make a protocol for the communication You could use Robin2's Updated serial basic writeup a inspiration