Hola muy buen día. Estoy haciendo un proyecto para mi escuela, el cual consiste en una mano rebotica que se logra mover por medio de sensores flexibles, sin embargo, el código que va dirigido hacia los servos, me marca un error y no logro como resolverlo ( me marca error en done = radio.read(msg, sizeof(msg)) por ello les agradezco.
Arduino:1.8.12 (Windows 10), Tarjeta:"Arduino Nano, ATmega328P (Old Bootloader)"
done = radio.read(msg, sizeof(msg));
^
exit status 1
void value not ignored as it ought to be
#include <Servo.h>
#include <SPI.h>
#include "RF24.h"
Servo myServo1;
Servo myServo3;
Servo myServo4;
Servo myServo2;
Servo myServo5;
RF24 radio(9,10);
const uint64_t pipe =0xE8E8F0F0E1LL;
int msg[5];
void setup()
{
myServo1.attach(15);
myServo2.attach(16);
myServo3.attach(17);
myServo4.attach(18);
myServo5.attach(19);
radio.begin();
radio.openReadingPipe(1, pipe);
radio.startListening();
}
void loop(){
if(radio.available()){
bool done = false;
while (!done){
done = radio.read(msg, sizeof(msg));
myServo1.write(msg[2]);
myServo2.write(msg[4]);
myServo3.write(msg[3]);
myServo4.write(msg[1]);
myServo5.write(msg[0]);
}
}
}