Either you or the original auther added a comment to the if and as a result everything that came after it is now considered a comment andignored
if (ReceivedMessage[0] == 111) // Indicates switch is pressed { digitalWrite(LED_PIN, HIGH); } else { digitalWrite(LED_PIN, LOW); } delay(2);
^ ^
| |
somebody added this the code following is now part of the comment and ignored
This would be the fix
void loop(void)
{
while (radio.available())
{
radio.read(ReceivedMessage, 1); // Read information from the NRF24L01
if (ReceivedMessage[0] == 111) // Indicates switch is pressed
{
digitalWrite(LED_PIN, HIGH);
}
else
{
digitalWrite(LED_PIN, LOW);
}
delay(2);
}
}
Your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with (nor for advise on) your project
See About the IDE 1.x category.