So far I found out this code for example, but it causes problems while going through the loop (too much delay at the same time at different buttons).
So I would need something that can blink a pixel without this long painful code and no delay command.
Code: Select all
if (x == 4) {
Serial.println ("button 5 pressed");
trellis.pixels.setPixelColor(4, 100, 255, 40);
trellis.pixels.show();
delay(150);
trellis.pixels.setPixelColor(4, 0, 0, 0);
trellis.pixels.show();
delay(150);
} else {
trellis.pixels.setPixelColor(4, 10, 20, 10);
trellis.pixels.show();
delay(10);
trellis.pixels.setPixelColor(4, 0, 0, 0);
trellis.pixels.show();
delay(10);
}