Nested Loop Won't Leave The Coop! I know a lot of people are busy

Nested Loop Won’t Leave The Coop!

I know a lot of people are busy with Christmas projects, so there’s no rush on this if you’d rather tackle something else.

I figured out how to make the Christmas lights on my house pulse in any given color, but now I’d like to try and tweak the sketch to rotate through the 8 major hues (by increasing the hue value in CHSV 30+ at a time).

I’ve looked up a bunch of C++ nested loop examples and tried to apply them to FastLED, and have gotten a bunch of weird results. I’m guessing I’m placing some {}'s or the FastLED.show(); in the wrong place, but I think I’ve tried every combination.

Again… I don’t mind pounding away at this for a couple more weeks, so no problem if people are busy. But if you have time for a quick look and it’s an easy fix, the code is at the link below.

http://pastebin.com/RAn14bBU

You have placed FastLED.show() outside of both of your loops. Ditto the delay - move them up above the } immediately above the show, and that should help.

Alternatively, I’m kind of a fan of setting up code so that FastLED.show gets called once per invocation of loop - in which case, I would tweak the outer for loop into something else like this: https://gist.github.com/focalintent/a3c4532383fb071abed8b879a22cab73

That’s far more amazing help than I expected that quickly! Can’t wait to get home and try it out.

(sorry for the double post attempt – I didn’t realize there was an approval process. They usually pop up quickly).

Thanks for the early Christmas present!

There usually isn’t - but sometimes g+ auto-moderates posts - and it looks like it mostly auto-moderates spam posts and posts with links to pastebin