The code i make is this */
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#include <Servo.h>
#define CE_PIN 9
#define CSN_PIN 10
const uint64_t pipe = 0xE8E8F0F0E1LL;
int servoy;
int servox;
Servo Yservo;
Servo Xservo;
RF24 radio(CE_PIN, CSN_PIN);
int joystick[2];
void setup()RF24
{
Serial.begin(9600);
delay(1000);
radio.begin();
radio.openReadingPipe(1,pipe);
radio.startListening();
Xservo.attach(3);
Yservo.attach(5);
}
void loop()
{
if ( radio.available() )
{
bool done = false;
while (!done)
{
done = radio.read( joystick, sizeof(joystick) );
servox= joystick[0]/5.683;
servoy= joystick[1]/5.683;
Serial.println(servoy);
Yservo.write(servoy);
Serial.println(servox);
Xservo.write(servox);
}
}
else
{
Serial.println("NO RADIO CONECTION");
}
}
and i don't know what happen it's said that
sketch_aug20b_rc_rc_rc_22:33:13: error: expected initializer before 'RF24'
void setup()RF24
^
C:\Users\ASUS\Documents\Arduino\sketch_aug20b_rc_rc_rc_22\sketch_aug20b_rc_rc_rc_22.ino: In function 'void loop()':
sketch_aug20b_rc_rc_rc_22:51:6: error: void value not ignored as it ought to be
done = radio.read( joystick, sizeof(joystick) );
^
exit status 1
expected initializer before 'RF24'