Hi
while trying to adapt a code from another person, it started to give the error "expected constructor, destructor, or type conversion before '(' token "
this was at the line " delay(890);" of my code below
Where's/what's the problem? I've checked and it was similar to the code before it (that Arduino IDE didn't flag has a problem.
//sketch_Bi_color
// Bi-color 1 LED red/green
//1 led red/green on/off or 2 LED on/off
//include scheduler since we want to manage multiple task
//#include<scheduler.h>
int wingtip_leds = 9;
int beacon_led = 10;
int tail_led = 8;
void setup() {
pinMode(wingtip_leds, OUTPUT);
pinMode(beacon_led, OUTPUT);
pinMode(tail_led, OUTPUT);
//Scheduler.startLoop(loop2); //add loop2, loop always started by default
}
//task 1
void loop(){
digitalWrite(wingtip_leds, HIGH);
delay(50);
digitalWrite(wingtip_leds, LOW);
delay(60);
digitalWrite(wingtip_leds, HIGH);
delay(50);
digitalWrite(wingtip_leds, LOW);
delay(840);
}
//task 2
// void loop2() {
digitalWrite(tail_led, HIGH);
delay(110);
digitalWrite(tail_led, LOW);
delay(890);
}
//task 3
// void loop3() {
digitalWrite(beacon_led, HIGH);
delay(110);
digitalWrite(beacon_led, LOW);
delay(890);
}