Hi, I’m trying to control an AC Light, with Arduino and NRF24L01 RF Modules, everything is pretty much done, but instead of having an On/Off Status, I have an Off and a blinking light instead of it being completely on, I’m using a normal switch connected to the Arduino, and other Arduino to use it as a receiver.
The code is posted below.
I found this “RF24 Class Reference” …
bool RF24::available ( uint8_t * pipe_num )
Test whether there are bytes available to be read.
Use this version to discover on which pipe the message arrived.
[out] pipe_num Which pipe has the payload available
True if there is a payload available, false if none is
but you have this …
without the PIPE parameter ?
Could that be the problem?
Unless your RF24 Library is different?
If not then how could the code compile without an error?
Q1) How often does your Receiver display “Radio not available” ?
Does it constantly re-display, over & over & over, when SW1 is OFF?
Q2) You send Message #111 for ON, but what Message #xxx do you send for OFF?
I was thinking, the “sender” should only send a Message on Change-Of-State of SW1 ?
When SW1 changes from OFF to ON then Send Message #111, one time.
When SW1 changes from ON to OFF then Send Message #112, one time.