Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- You can test and see if a pixel is black (off) like this:
- if ( leds[i] ) {
- // it has a R,G, and/or B value and is not black
- } else {
- // it is black (off)
- }
- You can also do something like this:
- // fade leds above RGB brightness 32
- for (uint8_t i = 0; i < NUM_LEDS; i++) {
- if ( leds[i].r > 32 ) { leds[i].r--; }
- if ( leds[i].g > 32 ) { leds[i].g--; }
- if ( leds[i].b > 32 ) { leds[i].b--; }
- }
Advertisement
Add Comment
Please, Sign In to add comment