This code was originally shared within a post authored by Noel Bundy  and posted

This code was originally shared within a post authored by @Noel_Bundy and posted by @Patrik_Nefuek , I am bringing this awesome share to the front of the pile for all eyes to see! I have had great fun adapting this code for my rigs. Happy testing!

Here is a VIDEO of what this code looks like: http://www.youtube.com/watch?v=G3uvVG-dPwQ

//REDACTED CODE// It seems there are complaints about the psuedo code that was originally posted. Here is a link to a “Fully Functioning” code block, be sure to add all the necessary setup() stuff…

http://pastebin.com/EBpRTPH5

Cheers!
http://shrib.com/LLraUNqr

I had to add #include <FastLED.h> but I still get a

LED_Sketch_rev_a:118: error: stray '' in program

error, tracking that down gave me some hits on pasting from a web page so I went through notepad but still get the errent , any ideas?

That code fails after a few days of constant running: it stops color cycling. I told the author about it and as far as I know, he hasn’t fixed it.

Check this, I have successfully used this code adaptation:
http://pastebin.com/EBpRTPH5

The way the code looks “as is” to me is a glowing bed of coals or sparkles. It cycles through the HSV rainbow hues, and then has a feature to just display everything to white. If someone has a better way, or adaptation to this, PLEASE SHARE IT HERE!!! The fastest way I have been able to learn, is by using code that works, then taking the time to go back through it and slowly tweak parameters, to see what it does to my LEDs.

@Jon_Burroughs That is exactly what it does, glowing pixels that cycle through the rainbow hues. But, let it run for a few days. My experience is that after about 48 hours it will fail and stop to color cycle and only display red. I let the author know and he acknowledged that there’s an issue.

@Ashley_M_Kirchner_No I recently came across your Youtube vid from 2012 Xmas led display, and I really liked your one particular animation that looked like a 4-5 led bar that shot up the strand, slowed to its final position, then fell back down as a single pixel. Too cool. When you program gravity into your animations, what method did you use? I was thinking of something like: dropDelay = -dropDelay/4; delay(dropDelay);

I found this link: http://rurandom.org/justintime/index.php?title=Driving_the_WS2811_at_800_kHz_with_an_8_MHz_AVR
There is a water torture video there that reminds me of what I saw in yours, only the other way round :slight_smile:

Specifically, this is the line that calculates the pause between each frame:

bouncePause = 85 - ((sqrt(((float)ceiling - currPx)/ceiling) - sqrt((ceiling - currPx)/ceiling)) * 85);

ceiling is a random variable determined for each shot going up. It determines how high it goes. currPx is the current pixel being worked on (along a string of 32), and the value ‘85’ just determines how fast it decays.

It slows down going up, and speeds up coming back down. I just fade it out after a few pixels when it reaches its apex and changes direction.

Won’t run with my Teensy 3.1 and WS2801 LEDs:
Error:

In file included from C:\Program Files (x86)\Arduino\libraries\FastLED/fastspi.h:6:0,
from C:\Program Files (x86)\Arduino\libraries\FastLED/FastLED.h:6,
from sketch_feb04a.ino:1:
C:\Program Files (x86)\Arduino\libraries\FastLED/delay.h: In function ‘void _delaycycles_AVR() [with int LOOP = 15; int PAD = 2]’:
C:\Program Files (x86)\Arduino\libraries\FastLED/delay.h:35:4: error: unknown register name ‘r16’ in ‘asm’

Any ideas?

Does “Supported Platforms Teensy 3” mean: 3.x or only 3.0?
Because there only stands Teensy 3, so my suggestion is, that all 3.x platforms are supported?!
And if the 3.1 is not supported, has anyone any ideas how to fix that?

3.1 is not supported … yet.

Oh noo :wink: But thanks a lot for the very fast and pleasant answers!
I hope it will be supported soon.

There is a new link to a video demo of the code…http://www.youtube.com/watch?v=G3uvVG-dPwQ

When I grabbed that code, as is, from pastebin, changed the HUEframeRate to 10 and colorIncrement to 1, this is what it does. Over time it turns white only and stays there for a while before going back to color cycling then it just repeats. I’m using the POV sticks I made as a “strip” …

YouTube video --> http://www.youtube.com/watch?v=GilVLh50iLY

@Ashley_M_Kirchner_No Regarding your “variable frame rate equation” above, I have a Q: Would it be faster to use the this equation to populate an array within my code, rather than use it to constantly calculate the answer? & What is a good method to calculate how long it takes to run your program loop?

So the reason I did it on-the-fly so to speak, is so that I can easily control the speed externally if I wanted to. For example, I can read in a pot’s value and set the speed accordingly. Pre-filling an array means you’re also stuck with that, unless you’re constantly refilling it, at which point you may as well do it on-the-fly.

Thank You For This!!!

Just came across this post for the first time O_O .
In the meantime I enhanced my code to include some more colors. http://pastebin.com/6xU8zrpV
And thanks @Jon_Burroughs , for posting this. I didn’t even recognize this up until now. Back when I posted the code I didn’t really get how g+ works :D.