76 lines
4.1 KiB
Raw Permalink Normal View History

2020-12-03 09:06:15 +00:00
This is a modification on this project: [](
2018-10-18 20:13:17 +00:00
# Adalight-FastLED [![Build Status](](
2017-03-30 02:46:35 +00:00
2016-12-20 08:58:53 +00:00
## Synopsis
2017-03-27 19:49:47 +00:00
This project modifies the Adalight protocol to use [FastLED]( ([]( This expands Adalight to, in theory, work with *[any supported FastLED strip](* including WS2812B (aka Adafruit NeoPixels).
2016-12-20 08:58:53 +00:00
2017-03-30 02:54:14 +00:00
In addition to ambilight setups, the protocol can be used to stream *any* color data over serial from a computer to supported LED strips.
For this sketch to work, you'll need to have a copy of the FastLED library. You can download FastLED [from GitHub]( or through the libraries manager of the Arduino IDE. This program was writen using FastLED 3.1.3 - note that earlier versions of FastLED are untested and may not work properly.
2016-12-20 08:58:53 +00:00
2017-06-08 23:34:55 +00:00
For more information on my own ambilight setup, see [the project page]( on [](
2017-06-08 22:03:22 +00:00
## Basic Setup
2016-12-20 08:58:53 +00:00
2017-03-19 23:20:07 +00:00
Open the LEDstream_FastLED file in the Arduino IDE and customize the settings at the top for your setup. You will need to change:
2016-12-20 08:58:53 +00:00
- Number of LEDs
- LED data pin
- LED type
2017-03-19 23:20:07 +00:00
2018-10-18 21:59:15 +00:00
If you are using a 4-wire LED chipset like APA102, you will need to uncomment the `PIN_CLOCK` line and set that as well.
2017-06-08 22:03:22 +00:00
Upload to your Arduino and use a corresponding PC application to stream color data. You can get the Processing files from the [main Adalight repository](, though I would recommend using [Patrick Siegler's]( fork of Lightpacks's Prismatik, which you can find [here](
## Additional Settings
There are additional settings to allow for adjusting:
2017-03-19 23:20:07 +00:00
- Max brightness
- LED color order
2016-12-20 08:58:53 +00:00
- Serial speed
2016-12-20 09:50:14 +00:00
- Serial timeout length
2016-12-20 08:58:53 +00:00
2017-06-08 22:03:22 +00:00
There are also optional settings to clear the LEDs on reset, configure a dedicated ground pin, and to put the Arduino into a "calibration" mode, where all LED colors match the first LED. To help with flickering, the option to flush the serial buffer after every latch is enabled by default.
2016-12-20 08:58:53 +00:00
2017-05-05 13:45:20 +00:00
## Debug Settings
The code includes two debugging options:
`DEBUG_LED` will turn on the Arduino's built-in LED on a successful header match, and off when the LEDs latch. If your LEDs aren't working, this will help confirm that the Arduino is receiving properly formatted serial data.
`DEBUG_FPS`, similarly, will toggle a given pin when the LEDs latch. This is useful for measuring framerate with external hardware, like a logic analyzer.
To enable either of these settings, uncomment their respective '#define' lines.
## Issues and LED-types
2016-12-20 08:58:53 +00:00
I've only tested the code with the WS2812B strips I have on hand, but so far it performs flawlessly. If you find an issue with the code or can confirm that it works with another chipset, please let me know!
2016-12-20 08:58:53 +00:00
## Credits and Contributions
2017-03-30 02:54:14 +00:00
Thanks to Adafruit for the initial code and for developing the Adalight protocol. The base for the original FastLED modifications is [this gist]( by [James Bruce]( Thanks James!
Pull requests to improve this software are always welcome!
2016-12-20 08:58:53 +00:00
## License
2012-12-05 20:02:32 +00:00
Adalight is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later version.
Adalight is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
2016-12-20 08:58:53 +00:00
License along with Adalight. If not, see <>.