Hi All,
I am currently working on a Project which receive data every 30 seconds from Slaves. There are 3 Slaves sending data to the Master Arduino. Note: I cannot change the Slave code, since I did not wrote the Slave software.
So basically, I have 3 devices that send temperature & humidity data each. My void loop/serial monitor start by showing:
- The unit ID
- How many devices are in that Unit
- Which Device is transmitting data
- Finally the data of that Device
What I want to do is to break down these data, having data for device 1 , device 2, device 3 separately. Probably storing them in array or maybe using Struc/Union to do this. However I am not sure how to proceed with this. Any suggestions ?
An example of the receiving data on the Serial Monitor is shown Below.
UNIT ID ABCD
NUMBER of Devices in UNIT 3
Which Unit is Transmitting 1
Temperature 25
Humidity 40
Which Unit is Transmitting 2
Temperature 27
Humidity 36
Which Unit is Transmitting 3
Temperature 26
Humidity 40