Here's my updated FastLED demos from January, 2017.
Switch branches/tags
Nothing to show
Clone or download
Permalink
Failed to load latest commit information.
aanimations Adding matrix_ray. Feb 10, 2018
aatemplate A few updates. Feb 3, 2017
beatwave Adding matrix_ray. Feb 10, 2018
black More updates. Feb 3, 2017
blendwave More updates. Feb 3, 2017
blur More updates. Feb 3, 2017
button_demoReel100 Been a long time. Nov 13, 2017
button_test More updates. Feb 3, 2017
confetti Remove show_at_maximum... Sep 3, 2018
confetti_pal More updates. Feb 3, 2017
dot_beat More updates. Feb 3, 2017
easing Small updates. Jun 23, 2017
every_n_example More updates. Feb 3, 2017
fht_log More updates. Feb 3, 2017
fht_log_ripple More updates. Feb 3, 2017
fill_colours More demos and irlight. Feb 3, 2017
fill_grad Remove show_at_maximum... Sep 3, 2018
inoise8_fire More demos uploaded. Feb 3, 2017
inoise8_mover Adding inoise8_mover. Feb 22, 2017
inoise8_pal_demo More demos uploaded. Feb 3, 2017
irtest More demos and irlight. Feb 3, 2017
juggle_pal More demos uploaded. Feb 3, 2017
lightnings More demos uploaded. Feb 3, 2017
matrix_pal_demo More demos uploaded. Feb 3, 2017
matrix_ray Adding matrix_ray. Feb 10, 2018
mover Remove show_at_maximum... Sep 3, 2018
noise16_1 More demos uploaded. Feb 3, 2017
noise16_2 More demos uploaded. Feb 3, 2017
noise16_3 More demos uploaded. Feb 3, 2017
one_sine_pal More demos uploaded. Feb 3, 2017
one_sine_pal_demo More demos uploaded. Feb 3, 2017
palettecrossfade More demos uploaded. Feb 3, 2017
plasma Adding plasma. Jan 31, 2018
rainbow_beat More demos uploaded. Feb 3, 2017
rainbow_march Update rainbow_march. Sep 3, 2018
rainbow_march_demo More demos uploaded. Feb 3, 2017
ripple_pal Last of the new code. Next to delete the old stuff. Feb 3, 2017
sawtooth Adding sawtooth, showing usage of BPM and millis(). Feb 11, 2018
seirlight Convert StrandId routine to run as a state machine. Mar 21, 2017
serendipitous Last of the new code. Next to delete the old stuff. Feb 3, 2017
sinelon Last of the new code. Next to delete the old stuff. Feb 3, 2017
soundbracelet Last of the new code. Next to delete the old stuff. Feb 3, 2017
soundmems Last of the new code. Next to delete the old stuff. Feb 3, 2017
soundmems_demo Big update to soundmems_demo. Sep 1, 2018
soundmems_noise A few small changes and removal of irlight. Mar 22, 2017
soundmems_pal Last of the new code. Next to delete the old stuff. Feb 3, 2017
soundmems_peak_ripple Last of the new code. Next to delete the old stuff. Feb 3, 2017
soundmems_wave Adding soundmems_wave. Feb 16, 2017
three_sin_demo Some old updates. Aug 22, 2016
three_sin_pal_demo Last of the new code. Next to delete the old stuff. Feb 3, 2017
two_sin_pal_demo Last of the new code. Next to delete the old stuff. Feb 3, 2017
LICENSE Initial commit of LED sequences. Aug 20, 2014
README.md Updated readme.md with soundmems_demo as well as Testing comments. Dec 1, 2017
fastled_support_faq.txt A couple of more small updates. Feb 3, 2017
fastled_tips_snippets.h Remove show_at_maximum... Sep 3, 2018

README.md

FastLED-Demos

By: Andrew Tuline

Email: atuline@gmail.com

Date: January, 2017

!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!

Before attempting to use these demos, make sure you can compile and run the examples found with the latest version of the FastLED library.

If this is your first foray into addressable LED's, then start off with a small strip of less than 20 LED's. Long strips require careful power management design and implementation, so start off small and then work up to longer strips.

Spend some time analyzing these demos, make changes to them and then make your own. Don't start off as a beginner trying to compile and run the advanced demos such as seirlight. Build up to it.

Finally, before looking for some support, have a look at fastled_support_faq.txt. Key things are to:

  • Check everything several times.
  • Break it down into simple components.
  • Understand the basics before trying the advanced routines.

If you're a beginner, learn to walk before you run.

Introduction

Here are several display sequences for FastLED for a single strand of addressable RGB LED's, such as NeoPixels/WS2812, WS2801 or DotStars/APA102. Each should compile and run separately and all have been tested on an Arduino Nano with appropriate inputs as required.

Almost all of these sequences are designed to be loop/non-blocking delay friendly. They perform some simple calculations, update the LED array, return back to the loop to SHOW the LED's and then continue on to the next iteration.

In addition to several standalone demos, I have included a comprehensive demo called seirlight (NOT for beginners), which supports multiple display sequences, multiple Arduino's, has a demo mode, EEPROM and IR remote support. There are also a couple of button controlled demos with EEPROM support.

In addition, I have included a few sound reactive sequences, most notably fht_log_ripple, which uses the Sparkfun MEMS microphone and the FHT (Fast Hartley Transform) library to respond to sound in the frequency domain. Tricky to get going, but very cool.

My LED Philosophy

I remember back in high school physics (in 1969) when my grade 9 physics teacher talked about wave particle duality where light can be thought of as either a wave or a series of particles. When I first started programming addressable LED's, I made sure that each LED was lit to a specific value and at a specific location just like the particles I had learned about in grade 9. This was quite tedious and I have since come to think of and to program a strand of LED's as not only a wave, but one that's been abstracted by colour palettes. The advantage is that we can come up with some very cool sequences using basic trigonometry, which we learned in Grade 10 math.

Notable Files

black.ino - Turns off your LED's, so you can program in peace without having to unplug your strand.

button_demoReel100 - Use button to control the mode. Press button for > 1 second to save current mode to EEPROM (as startup mode).

fht_log_ripple.ino - Uses Fast Hartley Transform (from a 3rd party library) to translate input sounds into frequency domain output. This is NOT for the beginner.

seirlight.ino - Runs on an Arduino connected to an LED strip. Compile seirlight.ino, and it will include the other files in the directory. The overall structure for this code was originally based on funkboxing LED. In addition, to the FastLED library, it also requires another 3rd party library support IR remote control. This is NOT for the beginner. See seirlight.ino comment section for more information on how to use this.

soundmems_demo.ino - Contains 10 sound reactive sequences. Does not contain delays and everything is modularized.

Controls

  • Sparkfun MEMS microphone (with built-in pre-amp) for sound.
  • TSOP38238 IR receiver an an el cheapo IR controller for IR control.
  • 10K potentiometer for analog control.
  • Any old button switch for push button control.

Microphones

If you go out and buy one of those cheap sound sensors from aliexpress, you will be sorely disappointed. The Sparkfun MEMS microphone includes an amplifier (with a gain of 67db), which provides a line in signal that's adequate for the Arduino works fine. Those sound sensors don't. You have been warned.

Testing

These sequences have been tested on an Arduino Nano with 60 APA102's. In many cases, such as seirlight, they will not go beyond 255 LED's without a major re-write.

More

Information about the awesome FastLED Library is available from: fastled.io

Download FastLED (select version 3.1) from: github.com/FastLED/FastLED

FastLED Documentation is at: http://fastled.io/docs/3.1/modules.html

The FastLED Google+ community is at https://plus.google.com/communities/109127054924227823508


My Youtube channel is at: https://www.youtube.com/user/atuline/videos

My Github account is at: https://github.com/atuline

My Gists are at: http://gist.github.com/atuline

My Pastebins are at: http://pastebin.com/u/atuline