First off, sorry if my code looks wierd, I'm a newb. Anyways, I was experimenting with making new functions in the void loop functions when this message keeps apearing at the "mainColors () ;" located in the void loop function. Can anyone tell me why it keeps saying "mainColors () ;" was not declared in scope? (And if I did misplace this fourm or just did something unwanted, please notify me so I don't keep doing it.)
const int RED = 9 ;
const int GREEN = 10 ;
const int BLUE = 11 ;
int DISPLAY_TIME = 100;
void setup ()
{
pinMode (RED,OUTPUT) ;
pinMode (GREEN,OUTPUT) ;
pinMode (BLUE,OUTPUT) ;
}
void loop ()
{
mainColors () ;
}
void mainColors ()
digitalWrite (RED,HIGH) ;
digitalWrite (GREEN,LOW) ;
digitalWrite (BLUE,LOW) ;
delay (1000) ;
digitalWrite (RED,LOW) ;
digitalWrite (GREEN,HIGH) ;
digitalWrite (BLUE,LOW) ;
delay (1000) ;
digitalWrite (RED,LOW) ;
digitalWrite (GREEN,LOW) ;
digitalWrite (BLUE,HIGH) ;
delay (1000) ;
}