Necesito ayuda error void-value-not-ignored-as-it-ought-to-be
Publicado por ROBERTO (1 intervención) el 20/04/2022 12:38:31
//Código del receptor ( mano ) - Mert Arduino y Tech
#include <Servo.h> //la biblioteca que nos ayuda a controlar el servomotor
#include <SPI.h> //la interfaz de comunicación con el módem
#include "RF24.h" //la biblioteca que nos ayuda a controlar el radio módem
//definir el nombre del servo
Servo miServo1 ;
Servo miServo3 ;
Servo miServo4 ;
Servo miServo2 ;
Servo miServo5 ;
radiofrecuencia RF24 ( 9,10 ) ; /*Este objeto representa un módem conectado al Arduino.
Los argumentos 9 y 10 son números pin digitales a los que se envían señales.
CE y CSN están conectados.*/
const uint64_t tubería = 0xE8E8F0F0E1LL ; //la direccion del modem que recibira los datos del Arduino.
mensaje int [ 5 ] ;
configuración vacía (){
//definir los pines de entrada del servo
myServo1.adjuntar ( 15 ) ; //A1
myServo2.attach(16); //A2
myServo3.attach(17); //A3
myServo4.attach(18); //A4
myServo5.attach(19); //A5
radio.begin(); //it activates the modem.
radio.openReadingPipe(1, pipe); //determines the address of our modem which receive data.
radio.startListening(); //enable receiving data via modem
}
void loop(){
if(radio.available()){
bool done = false;
while (!done){
done = radio.read(msg, sizeof(msg));
myServo1.write(msg[2]); //A1
myServo2.write(msg[4]); //A2
myServo3.write(msg[3]); //A3
myServo4.write(msg[1]); //A4
myServo5.write ( mensaje [ 0 ]) ; //A5
}
}
}
Me da error en
done = radio.read(msg, sizeof(msg));
void-value-not-ignored-as-it-ought-to-be
#include <Servo.h> //la biblioteca que nos ayuda a controlar el servomotor
#include <SPI.h> //la interfaz de comunicación con el módem
#include "RF24.h" //la biblioteca que nos ayuda a controlar el radio módem
//definir el nombre del servo
Servo miServo1 ;
Servo miServo3 ;
Servo miServo4 ;
Servo miServo2 ;
Servo miServo5 ;
radiofrecuencia RF24 ( 9,10 ) ; /*Este objeto representa un módem conectado al Arduino.
Los argumentos 9 y 10 son números pin digitales a los que se envían señales.
CE y CSN están conectados.*/
const uint64_t tubería = 0xE8E8F0F0E1LL ; //la direccion del modem que recibira los datos del Arduino.
mensaje int [ 5 ] ;
configuración vacía (){
//definir los pines de entrada del servo
myServo1.adjuntar ( 15 ) ; //A1
myServo2.attach(16); //A2
myServo3.attach(17); //A3
myServo4.attach(18); //A4
myServo5.attach(19); //A5
radio.begin(); //it activates the modem.
radio.openReadingPipe(1, pipe); //determines the address of our modem which receive data.
radio.startListening(); //enable receiving data via modem
}
void loop(){
if(radio.available()){
bool done = false;
while (!done){
done = radio.read(msg, sizeof(msg));
myServo1.write(msg[2]); //A1
myServo2.write(msg[4]); //A2
myServo3.write(msg[3]); //A3
myServo4.write(msg[1]); //A4
myServo5.write ( mensaje [ 0 ]) ; //A5
}
}
}
Me da error en
done = radio.read(msg, sizeof(msg));
void-value-not-ignored-as-it-ought-to-be
Valora esta pregunta


0