Profile cover photo
Profile photo
Chad Eby
56 followers
56 followers
About
Communities and Collections
View all
Posts

Hello!

A question: I want to display a complete color palette, without repeats, on a strip that is NUM_LEDS in length. I modified the function from the Kriegsman-Tuline palettecrossfade.ino like this:

void FillLEDsFromPaletteColors(uint8_t colorIndex) {
for (int i = 0; i < NUM_LEDS; i++) {
leds[i] = ColorFromPalette(currentPalette, map(i, 0, NUM_LEDS, 0, 240), 255);
}
}

(going only to 240 rather than 255 to keep from wrapping). This seems to work okay, but I suspect there is a better way to do it. Any thoughts?

Post has attachment
Okay, super oddball question/mystery.

I am using FastLED on Adafruit's lovely Circuit Playground; It has 10 neopixels on board in a ring. I have been running many of the excellent code examples from this group on it to great effect, and have started digging in to make some of my own animations and patterns.

I was playing around with code from J Hendy's blog (@ http://jwhendy.blogspot.com/2015/10/fastled-series-back-and-forth.html ) and managed to (badly) make a sketch that appears to upload okay, but then refuses to execute AND (weirdly) takes the ACP board right out of the Arduino's port list, making subsequent uploads impossible until you put the board in bootloader mode (by double-tapping the reset button when the IDE is running through the possible ports) while uploading a short sketch...this reliably fixes the problem and the board shows back up.

Here's a listing of the code:
http://pastebin.com/eUkbYqE9

Does anybody know why using 'lead_dot -1' has such a catastrophic effect?

Arduino IDE 1.6.10, OS X, FastLED 3.1

Thanks!
Chad

Post has attachment
Migrating from Facebook; one more attempt before I give up completely on social media...
Wait while more posts are being loaded