Happy Halloween from Adafruit! Check out some scary #electronichalloween posts, the frightening Halloween section and spooky videos!

December 28, 2012 AT 6:00 am

Control an LED Light Strip with Javascript

Tubular Glow – Control an LED Light Strip with Javascript

Adafruit’s Digital Addressable LED Strips are quite versatile – they’re flexible, capable of displaying 2 million colors per pixel, and their LEDs can be controlled individually – allowing for countless project possibilities.

In this tutorial, we’ve inserted the strips into a clear plastic tube to create a thin column of LED lights, and then connect them to JavaScript GUI sliders through Spacebrew.

The LED tube could be used as one “bar” of a digitally controlled bar graph installation, as part of a sculptural feature, or – my favorite – a makeshift light saber. Follow the steps below to make your own!

These LED strips are fun and glowy. There are 32 RGB LEDs per meter, and you can control each LED individually! Yes, that’s right, this is the digitally-addressable type of LED strip. You can set the color of each LED’s red, green and blue component with 7-bit PWM precision (so 21-bit color per pixel). The LEDs are controlled by shift-registers that are chained up down the strip so you can shorten or lengthen the strip. Only 2 digital output pins are required to send data down. The PWM is built into each chip so once you set the color you can stop talking to the strip and it will continue to PWM all the LEDs for you.

In Stock and Shipping Now


Check out all the Circuit Playground Episodes! Our new kid’s show and subscribe!

Have an amazing project to share? Join the SHOW-AND-TELL every Wednesday night at 7:30pm ET on Google+ Hangouts.

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Learn resistor values with Mho’s Resistance or get the best electronics calculator for engineers “Circuit Playground”Adafruit’s Apps!



No Comments

No comments yet.

Sorry, the comment form is closed at this time.