Integers, floats, arrays, structs... (Arduino)
November 30, 2012
I need a bit of programming help. What I want to do is sent integers, floats, longs from an Arduino to another Arduino using nRF24L01 modules. I use the RF24 library to handle the wireless modules. At the moment I only sent an array of integers from one Arduino to another.
Piece of my current code:
if ( radio.available() )
// Dump the payloads until we've gotten everything
bool done = false;
// Fetch the payload, and see if this was the last one.
done = radio.read( &remote, sizeof(remote) );
Now what is the best way to sent a mix of different integers, floats, longs? I honestly have no clue how to accomplish this.