Reputation: 1
I am writing using a code i found on youtube for an RC retractable gear controller.
I keep getting this message of "Compilation error: expected unqualified-id before 'void'" and I dont know why. anybody knows why?
The problem appears only with "void setup" and if i delete "void setup" it shows on "void loop"
I am using Speeduino XIAO
Here is the code:
`int RCSIGNAL,
#define ButtonA 5
#define ButtonB 6
void setup(){
pinMode(7, INPUT);
pinMode(5, INPUT);
pinMode(6, INPUT);
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
}
void loop(){
RCSIGNAL-pulseIn(7,HIGH);
if (digitalRead(ButtonA) ;- 1 and RCSIGNAL \<1400)
{
digitalWrite(9, HIGH);
}
else
{
digitalWrite(9, LOW);
}
if (digitalRead(ButtonB) ;- 1 and RCSIGNAL \> 1900)
{
digitalWrite(10, HIGH);
}
else
{
digitalWrite(10, LOW);
}
delay(10);
}`
Upvotes: 0
Views: 18