Git Product home page Git Product logo

fastled-demos's Introduction

#FastLED-Demos

By: Andrew Tuline

Email: [email protected]

Date: March, 2015

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

If this is your first foray into addressable LED's, then start off with a small strip of < 20 LED's. Long strips can exhibit some significant power issues, so start off small and work up to longer strips.

Before attempting to use these demos, you should compile and run the examples found with the latest version of the FastLED library, available at:

https://github.com/FastLED/FastLED

In some cases, you may need to use the latest development version of FastLED.

##Introduction

Here's several COMPLETELY re-written display sequences for FastLED for a single strand of RGB LED's, such as Neopixels, WS2812B, WS2801 or APA102. Each should compile and run separately and have been tested on an Arduino UNO and Nano 3.0.

In an older version, I had several demos that used nested for loops, required a lot of code, weren't highly customizable. Except for some really cool ones, most of those have now been replaced. For instance, two_sin() replaces several 'marching' type sequences and supports several variables to change colour, phase, direction, brightness and so on. Likewise, pop_fade_demo replaces several twinkling sequences.

The new sequences are now designed to be loop/non-blocking delay friendly. They perform some simple calculations, update the LED array and then then 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 display template as well as aalight and aainfra, which support multiple display sequences, a demo mode, keyboard, IR remote and updated pushbutton control.

I have also included a few sound reactive sequences, most notably fht_log, which uses the Sparkfun MEMS microphone and the FHT (Fast Hartley Transform) library to respond to sound in the frequency domain. Very cool.

aatemplate.ino - A standard display template which can be re-used.

aalight.ino - Runs on an Arduino connected to an LED strip. Compile aalight.ino, and it will include the other ino files in the directory. The structure for this code is based on funkboxing LED. In addition, to the FastLED library, it also requires a couple of other 3rd party libraries to support pushbutton and IR remote control.

aainfra.ino - Runs on a 2nd Arduino with an IR sensor attached. Compile aainfra.ino and connect Tx of the 2nd Arduino to Rx of the first one. You will need to disconnect that in order to program the Arduinos.

See aalight.ino comment section for more information on how to use this. Also see aalight.png for a breadboard layout.

The awesome FastLED Library is available from: fastled.io

Download FastLED from: github.com/FastLED/FastLED

Update

I've replaced a pile of if statement with switch statement for the demo loops. <<<<<<< HEAD

Adding to the Library

In order for me to add sequences to the library, my expectation is that they:

  • Run quickly (no nested for loops with delay statements).
  • Be called with many different parameters.
  • Be short.
  • Use 8 or 16 bit math. No floating point.

=======

4398e44db27cfe95bc2af7aae86aadaba7bfb15e


An LED links page on my web site: http://www.tuline.com/dru/content/led-products-libraries-and-effects

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

My future LED site will be at: http://www.twinkleds.com (already registered with an 'under construction' page)

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

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

My personal web site is at: http://www.tuline.com

My FastLED FAQ is at: http://www.tuline.com/dru/content/my-fastled-support-faq

fastled-demos's People

Contributors

atuline avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.