Extremely new trying to figure out this library with limited coding experience.

Extremely new trying to figure out this library with limited coding experience. I’m trying to have a string of leds go blue and then fade to black and then repeat.

Here my code: http://pastebin.com/KejGeFdV

I have a feeling it might be because I’m not nesting my loops. I’m not 100% sure on how that should be done to achieve my goal or is that is even the right approach. Any suggestions would be helpful.

I’m also interested in have the colors breath. Slowing going up and down in brightness but I’m at a loss for how to do that too.

Any ideas, thought or suggestions would be greatly appreciated. Thanks in advance.

@Keyth_Rodgers I don’t have time/opportunity to dig up some code right now, but you can accomplish what you want with HSV settings.

Set the H to whatever blue is, and have the V start at 0 and increase in your choice of increments to 256, then have it decrease back to 0.

@Keyth_Rodgers - - In your sketch change:

fadeToBlackBy(leds, NUM_LEDS, 64);

I tested this on a 24 NeoPixel ring and it will do what you want. I lowered the 64 to 48 for my ring so it looked better.

Your code just lowered the brightness of each pixel by (64/256), once.

@Charity_Stolarz , Do you understand this code well enough to know what numbers do what to the actual breath? Also do you know how I might adapt something like this to have a breath wave, so not all the leds are “breathing” all at once?

@Keyth_Rodgers I’ve found the absolute best way to learn what the numbers do is to change them and see what happens. Once you notice the differences you can comment the lines as a future reference for yourself.

I’ve also found that if you’re willing to put in the time and effort to learn, and try, the simpler things, everyone is far more willing to help you out with the tougher things.

All the best on your project!