Nov 102013
 

[EDIT] Here is a link to an update of these effects made by Stefan Mayer designed to work with the OctoWS2811 LED Library. Thanks a lot Stefan, great work!

[EDIT] I’m planning to clean up the Android control app source and put it on github, but in the meantime here’s the code.

[EDIT] If you end up using this code for a project please send me a link/pics/video! I love seeing what people do with this! If you like I’ll post a link to your project on the FastSPI FX – User Coolness post. Also make sure to thank Daniel Garcia (the genius dev of the FastSPI library) on the G+ FastSPI Community.

Here is an update to the Arduino FastSPI2 FX demo code (v0.51). I’m also introducing an Android Bluetooth Control App and a Chrome Extension.


I’ll continue to work on improving these programs but I think I have them to a point where it might be useful to some people- so here they are!

Here is the Arduino Sketch (v0.51)

Here is the Android App on the Google Play Store (v0.1a)

Here is the Chrome LED Controller Extension (v0.1)

— — — SETUP / NOTES — — —

ARDUINO:
– This version uses the Software Serial library and FastSPI2 library. Also the default serial speed is now 57600.
– The following is a breadboard layout and schematic for setting up a JY-MCU Bluetooth chip with an Arduino (Duemilenove or Nano) to drive a strip of addressable LEDs. This should work with any LED strip that is supported by FastSPI2 RC4 and later.
ArduinoBTLEDSimple_011_breadboard_bbArduinoBTLEDSimple_007_schematic_schem

ANDROID APP:
– To control LED strips via the Android app you’ll have to pair the JY-MCU module with your smartphone/tablet in the Bluetooth/Wireless settings. The PIN for these modules is usually 1234.

CHROME EXTENSION:
– To load the extension, unrar the file to a directory. Then in Chrome go to Settings>Extensions>Load Unpacked Extension. Then select the directory. Then you can launch it from there.
– This extension has been tested on Ubuntu 12.04 and WindowsXP. For Windows you’ll have to install the USB Serial drivers, but the automatic driver search seems to work fine for this.

— — —

If you find this really useful, please consider donating a little to the cause. Thanks!
[paypal-donation reference=”FastSPI2 LED FX – Android/Chrome”]

I’m also grateful for bitcoin donations to: 1K5Yy77ejes2FZrHBG5fns3QAicnwZcduq

 

Oct 152013
 

I had a little trouble finding references to how to setup multiple strips with FastSPI2, so I thought I’d post this.

You just use an offset value like in this example:

LEDS.addLeds<WS2801, 7, 9,   RGB>(leds, 43);       //<---Strip1 - WS2801 - 43 LEDs
LEDS.addLeds<WS2801, 11, 13, RGB>(leds, 43, 12);   //<---Strip2 - WS2801 - 12 LEDs
LEDS.addLeds<WS2811, 5,      GRB>(leds, 55, 16);   //<---Strip3 - WS2811 - 16 LEDs

In the additional strips the first integer passed becomes the offset value and the second is the number of LEDs in the strip.

LEDS.addLeds<STRIP, CLK_PIN, DATA_PIN, RGB_ORDER>(ARRAY, OFFSET, LED_COUNT);

Oct 032013
 

[EDIT] Please check out the newest version of the FX Code (v0.51) with Android Bluetooth Control App and Chrome Control Extension.

[EDIT] Fixed a really dumb problem in the Arduino code, added a color picker to the python GUI, and uploaded a new video demo. The problem was I was using if (serial.available()) and should have been using while. That gummed up the works and made the LEDs flicker if you moved the sliders too fast. That’s fixed now. Should have waited and tested better but I was all excited to get this posted- live and learn, or more likely just repeat the same mistakes and correct myself as I go along.

Here’s another revision to the FastSPI2 effects demo code. Some code cleanups, a few new effects, and a python GUI (gtk). GUI can select effect by name and control brightness, delay, color-step, hue, and saturation of various effects.

Screenshot from 2013-10-03 19:52:46

Here’s the Arduino Code

Here’s the Python Code

 

If you find this really useful, please consider donating a little to the cause. Thanks!

[paypal-donation reference=”FastSPI2 LED FX Code”]

I’m also grateful for bitcoin donations to: 1K5Yy77ejes2FZrHBG5fns3QAicnwZcduq

Sep 212013
 

[EDIT] Please check out the newest version of the FX Code (v0.51) with Android Bluetooth Control App and Chrome Control Extension.

[EDIT] Revised once again, and made a python GUI. See this new post.

This is a revision of the original FastSPI LED Effects Examples I wrote awhile back.

LED_POST

I’ve gotten some very positive responses for these examples so I figured I should update them to be a little less clunky (the operative term here being ‘less’, they’re still quite clunky) This revision will work with RC3 of the FastSPI2 Library.

http://youtu.be/5c6vYoZInjw

These are little LED displays I made, one is a circular back-light and the other a wave shape with a little diffusion in front. Both are Arduino powered of course. I just ran the ‘demo mode’ on both and tried to start at the same time so they’re not in sync or anything. Just thought I’d show them on a couple of different configurations for the heck of it.

If you have any issues getting this to work please check through the comments on the original post page first. A lot of people have posted very helpful comments about their experience using the code that might help you on your way. And of course feel free to post your issue if you can’t find a solution- I’ll do what I can to help.

Most significantly I’ve removed the need for the SerialCommand library and the really hacky HSV->RGB conversion function in favor of the native FastSPI2 conversion which is much faster and cleaner and supports ‘rainbow’ and ‘spectrum’ modes (though for these examples I just stuck to ‘rainbow’.)

I also added one example of a ‘native’ FastSPI effect; the fill_rainbow function (new_rainbow_loop – mode 88). This is similar to the ‘rainbow_loop’ function except that is fades the colors into one another much better. I’ll add more ‘native’ effects functions like fades to the code later because they are much faster and have nicer aesthetic qualities than mine.

Change modes the same way as in the previous code, enter ‘m’ and then an integer for the mode number (listed in code). Also make sure you send a NEWLINE character. Mode 888 is ‘demo mode’ which cycles through all the modes, but this tends to block the next serial command.

Also you can change the maximum brightness with ‘b’ and then an integer from 0-255. By default it’s set to 64, about 1/4 brightness.

Here is the code.

[EDIT] I recently fixed a few issues where I messed up the HSV conversion and I utilized a few more of the FastSPI2 functions. Also finally started giving the code a version number. This one’s v0.3, I’ll do better with that in the future.

Most notably I added the ability to adjust parameters of many of the effects via serial commands. The following commands are now accepted:

(d)elay 0-INF | d50 | Adjusts the delay value, effects run faster or slower.

(s)tep 0-INF | s5 | Adjusts the steps between colors, mostly for rainbow effects.

(h)hue 0-255 | h180 | Adjusts the hue of effect, mostly for one and two color effects.

sa(t)uration 0-255 | s50 | Adjusts the saturation of effect, mostly for one and two color effects.

Here is the code. (v0.3)

If you have any requests feel free to ask, I’ll see what I can do! I’m more-or-less open for business if you have anything in particular you need tackled. And if you find these very useful, please consider donating a little via. paypal, I’d really appreciate it 🙂

[paypal-donation reference=”FastSPI2 LED FX Code”]

I’m also grateful for bitcoin donations to: 1K5Yy77ejes2FZrHBG5fns3QAicnwZcduq

Oct 262012
 

[EDIT] Please check out the newest version of the FX Code (v0.51) with Android Bluetooth Control App and Chrome Control Extension.

This code has been revised and I made a new post about it – please see updated post HERE

[EDIT] If you end up using this code for a project please send me a link/pics/video! I love seeing what people do with this! If you like I’ll post a link to your project on the FastSPI FX – User Coolness post. Also make sure to thank Daniel Garcia (the genius dev of the FastSPI library) on the G+ FastSPI Community.

[EDIT] If you have any requests for certain types of effects I’d be happy to look into it. Just let me know what you’re looking to do and I’ll take a swing.

If you find this code very useful please consider donating a little via paypal. I’m having some ‘financial instabilities’ right now and any little bit would help. And if you need a certain effect coded, a donation would certainly obligate me to get that working for you! Sorry for this, it sort of feels like panhandling and the real credit should go to the library creator, but we do what we have to… Thanks for understanding.

[paypal-donation reference=”FastSPI LED FX Code”]

I’m also grateful for bitcoin donations to: 1K5Yy77ejes2FZrHBG5fns3QAicnwZcduq

fastspijpg

Some LED effects I’ve written for Arduino and FastSPI library.

Mostly written for a circle of LEDs but plenty useful for any configuration.
Code available here… the code

***Here is an update to the FastSPI_2_RC1 – the code

Used WS2811 strip, but have also tested with WS2801.

I’ve only tested this on the duemilanove and nano boards. It’s looking like this does not work on the UNO and I’m not sure about the Leonardo or the new Due.

Several people have indicated problems finding the SerialCommand library – so here’s the version I’m using SerialCommand

Here’s where I found it. Thanks to this guy for the library- Steven Cogswell
http://husks.wordpress.com/2011/05/23/a-minimal-arduino-library-for-processing-serial- commands/

http://youtu.be/Jcs1udKP4rs