Hi,
I'm new to Arduino. I have two Uno's plus two nRF24L01+ (PA units). My idea was to put some kind of sensor on one Arduino Uno, and use the nRF24L01 to send the sensor value (let's say temperature) to the other Arduino Uno (server unit), and the server unit turns on an LED if the temperature is OK.
Which seems to be two libraries for the nRF24L01 driver. The "Mirf" and the "RF24". Which one is recommended for these types of project where you just want to send bytes between to devices?
I've been slowly working with the Mirf library, and I have the ping-pong example running, but I'm uncertain how to put a number in place of the byte that's being passed back and forth in the example. I'm new to programming. Maybe someone would be so kind as to explain a few lines of code? Specifically:
Mirf.setRADDR((byte *)"clie1");
unsigned long time = millis();
Mirf.send((byte *)&time);
Why is the (byte *) and "&" operator used here? I thought the * means "value of" and the & means "address of".
If I have a variable that denotes distance (an int) that I'm trying to send, would I simply put in this?
Mirf.send((byte *)&distance);