We are using a fabulous code base called React, by Jason Coon.  This code requires installing a few custom Teensy Arduino libraries, and comes ready to go with over a dozen different amazing LED modes, many based on contributions from Mark Kriegsman and the FastLED community.

More about Jason's creations and EvilGeniusLabs

So let's get these libraries installed!

Arduino versions 1.6.5 and above make it easy to install libraries from within the IDE, but since these are custom libraries, we need to do it the old-fashioned way -- the library installer in Arduino will not work.  

  1. Download all the .zip files
  2. Unzip the files and rename the resulting folders, getting rid of the "-master" -- i.e. "react-master" becomes "react"
  3. Quit Arduino
  4. Move the React code base into your Sketchbook
  5. Move the renamed library folders into your Arduino > Libraries folder.
  6. Restart Arduino

Note: These library versions have been modified to work with the Teensy 3.2.  If you have a different, or more "official" version of these libraries you will need to replace those libraries with the downloads found here.

We can install the last 2 libraries via the Arduino library manager.

Open up the Arduino library manager:

Search for the IRremote library and install it

Search for the SerialFlash library and install it

Open the react.ino file in Arduino and make sure it compiles.  If it doesn't, go back and be sure all the libraries above are installed correctly.

We also have a great tutorial on Arduino library installation at:
http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use

 

Take a look at the code.  Near the top, change LED_PIN to 0 and CLOCK_PIN to 1.   Change NUM_LEDS to reflect the number of dotstars you're using in your project.  

(I have just 7 LEDs but have changed this number to 8, since it seems to make the patterns run a little more smoothly for me)

Download: file
#define LED_PIN     0
#define CLOCK_PIN   1
#define IR_RECV_PIN 12
#define COLOR_ORDER GBR
#define CHIPSET     APA102
#define NUM_LEDS    8
This guide was first published on Apr 21, 2016. It was last updated on Apr 21, 2016.
This page (Code) was last updated on Sep 21, 2020.