Hi all,  I was looking around for cool patterns to use on my Neopixel

Hi all,

I was looking around for cool patterns to use on my Neopixel light strip attached to a teensy 3.1 and I stumbled upon this code from the Funkboxing. Specifically this

http://funkboxing.com/wordpress/wp-content/_postfiles/sk_qLEDFX_POST.ino

He has newer code on his site, but that is geared toward controlling with your phone/browser and I am not really trying to do that.

The stuff looks awesome but it was written with the older FastSPI2 Led library in mind. I just want to somehow get the patterns working on my teensy which are controlled by a push button to change individual patterns. I am currently using the bounce.h library to detect presses.

Long story short - How hard (if at all) could this be converted to use with the newer fastled library? I am using the most recent library that supports (in beta) the teensy 3.1

Any help or guidance is much appreciated!

Fastspi_led2 and FastLED are the same - we changed the name before the release (because the library makes more than just SPI fast these days), you just need to change the include file to FastLED.h to get the right thing included.

you don’t have to define the CRGB structure
(this line:) struct CRGB { unsigned char g; unsigned char r; unsigned char b; };
// just comment it out.
the leds definition should look like this:
struct CRGB leds[NUM_LEDS];

the code inside setup() must be changed (just look at the included examples in the fastLED library)

Good luck experimenting, I haven’t looked at the rest of the code.

I’d use his updated code, even if it has the serial commands that you wont use. It’s much cleaner.

http://funkboxing.com/wordpress/wp-content/_postfiles/sk_FastSPI2FXv051_POST.ino

All you need to do is change the library to include FastLED.h

and then modify the setup section for your neopixel
LEDS.addLeds<WS2812B, LED_DT, GRB>(leds, LED_COUNT);

Daniel, Gottfried, and Randal - Thank you all for taking the time to answer. I will spend sometime on it when I get a chance tonight =]. Much better answer than I was thinking (eg - starting from scratch)