Thread: RGB LED Help
View Single Post
  #3   Spotlight this post!  
Unread 13-04-2013, 00:58
DjParaNoize-'s Avatar
DjParaNoize- DjParaNoize- is offline
Registered User
no team
Team Role: Leadership
 
Join Date: Mar 2013
Rookie Year: 2012
Location: California
Posts: 55
DjParaNoize- is an unknown quantity at this point
Re: RGB LED Help

Quote:
Originally Posted by mman1506 View Post
What is the error?
CODE:
// walking r-g-b
for (int j = 0; j < 3; j++) {
memset(leds, 0, NUM_LEDS * 3);
for(int i = 0; i < NUM_LEDS; i++ ) {
switch((i+j) % 3) {
case 0: leds[i].r = 200; break;
case 1: leds[i].g = 200; break;
case 2: leds[i].b = 200; break;
}
}
FastSPI_LED.show();
delay(300);

ERROR:
expected unqualified-id before 'for'


Please excuse me For I am Somewhat New to the coding