The sketch name had to be modified.
Sketch names must start with a letter or number, followed by letters,
numbers, dashes, dots and underscores. Maximum length is 63 characters.
C:\Users\IFTech\Documents\Arduino\new_tra\new_tra.ino: In function ‘void loop()’:
new_tra:26:11: error: void value not ignored as it ought to be
done = radio.read(msg, 1);
^
Multiple libraries were found for “nRF24L01.h”
Used: C:\Users\IFTech\Documents\Arduino\libraries\RF24
Not used: C:\Users\IFTech\Documents\Arduino\libraries\NRFLite
Not used: C:\Users\IFTech\Documents\Arduino\libraries\NRFLite
Not used: C:\Users\IFTech\Documents\Arduino\libraries\NRFLite
Not used: C:\Users\IFTech\Documents\Arduino\libraries\NRFLite
exit status 1
void value not ignored as it ought to be
This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.
#include <nRF24L01.h>
#include <printf.h>
#include <RF24.h>
#include <RF24_config.h>
int msg[1];
RF24 radio(9,53);
const uint64_t pipe = 0xE8E8F0F0E1LL;
int LED1 = 13; // led pin 13
int LED2 = 5;
void setup(void){
Serial.begin(9600);
radio.begin();
radio.openReadingPipe(1,pipe);
radio.startListening();
pinMode(LED1, OUTPUT);
pinMode(LED2, OUTPUT);}
void loop(void){
if (radio.available()){
bool done = false;
while (!done){
done = radio.read(msg, 1);
Serial.println(msg[0]);
if (msg[0] == 111){delay(10);digitalWrite(LED1, HIGH);}
if (msg[0] == 222){delay(10);digitalWrite(LED2, HIGH);}
else {digitalWrite(LED1, LOW);}
delay(10);}}
else{Serial.println("No radio available");}}
Pleas click Report to Moderator and ask to have them merged so we have all your info in one place and so we don't repeat advice you have already received.
You want help which people are willing to give you for free. So how about helping us to help you by responding to the advice and comments you have already received?