Help get this topic noticed by sharing it on Twitter, Facebook, or email.

Getting Started with Adafruit Trinket -- Arduino c Code Question

I've got the programming environment set up in windows and have installed the sketch for the first intermediate project uploaded. The LEDs light and fade but only as called for in the first loop. The second loop which would fade the lights in the other direction doesn't seem to run. I'm just beginning to program Arduino/Trinket and know this may not be an appropriate forum for this question but....

void loop() {
int8_t i;

for(i=0; i
strip.setPixelColor(1,strip.Color(255-i,0,0));
strip.show();
delay(6);
}

delay(100);

for(i=255; i >=0 ; i--) {
// Cycle the first Neopixel down in blue, the second up in red
strip.setPixelColor(0,strip.Color( 0,0,i));
strip.setPixelColor(1,strip.Color(255-i,0,0));
strip.show();
delay(6);
}

I've been looking at this all day and am feeling frustrated but I'll keep on.

Thanks, Terry S
1 person has
this question
+1
Reply