Adalight with FastLED

I’ve previously mentioned that I was initially using this code by James Bruce to drive the ambilight. While I was waiting for the circuit board components to arrive, I thought I would take some time to expand on his work, fix some bugs, and add a few features I thought were missing. After a few recent tweaks it’s now ready for distribution.

Presenting: Adalight-FastLED!

I’ve reworked the Adalight code to provide user-friendly options that allow you to easily customize it for your setup. I also added a brightness limiter and a calibration mode, which sets all LEDs to the same values.

Although I’ve only tested it with WS2812B strips, in theory the code should work with any FastLED supported chipset! These are relatively small changes from a programming standpoint, but it should make it easier for anyone to build their own Adalight setup without mucking around with the code.

I’ve created a git repository for the project, which I’ve decided to call Adalight-FastLED. You can find the repository, with the download links, here:

If you find an issue with the code or can confirm that it works with a specific LED type, please let me know! (Creating an issue on the GitHub repo would be the preferred method.) I’m hoping to keep the repository up to date for the foreseeable future.

This post is part of a series on creating a DIY ambilight using Adalight and WS2812B LEDs. Check out the project page here.

Next up: Part 7 – Videos and Gifs

10 thoughts on “Adalight with FastLED”

  1. I tried your sketch “Adalight-fastLED” with FastLED 3.1.3 library and Prismatic but the LED didn’t light up at all, the Led works fine with Adafriut Neopixel Library so i know for sure its not a hardware issue, any idea how to fix the issue with your code ?

    1. The current code has no issues that I’m aware of. Check that you have the correct serial port selected in Prismatik, otherwise try sending data through another application or switching USB ports / cables.

      Scratch that last – someone else reported an issue with the code if your LED length is above 85. You can try out a test fix on the ‘development’ branch, otherwise expect a fix in the next release.

  2. Hi Dave,

    nice project and well done work.

    I tried the “Adalight-fastLED” Release 1.1.0, but the Leds wont light up. I have 114 leds. I tried it with 60: works fine.
    The limit is 85 leds. I did not debug the code, but 85 leds with 3 byte color is 255 bytes; i think this causes the limit.

    Is there an intention to make Adalight-fastLED work with more than 85 leds?

    I used FastLed 3.1.3 with prismatik 5.11.3.

    1. Hi Daniel,

      Thanks for the kind words. Someone else reported the same problem earlier this week. I’m not 100% sure what’s causing the issue, but I have a hunch. I’ve pushed a test fix to the ‘development’ branch on Github, which works for LED lengths above 85 on my setup. See if that works for you, and I’ll include the bugfix in the next release.

      1. Hi there,

        Since I’m starting to collect what I need for this project…I want to do it with 144 leds/m LED strip.
        I have a 34” inches ultrawide monitor. From my calculations that is 108 leds at the top and 43 leds at the side so total of 302 leds. Is it possible or there’s still the limitation of the 85 leds?
        Thanks in advance.

        1. The 85 LED limitation should be fixed and work fine with 302 LEDs, although I’ve never tested with that many. I’d recommend against it though, as your framerate will be very poor (see the appendum posts about Adalight framerate).

  3. Thanks for the reply. I just read it very fast. I will read it carefully later today.
    I just wanted to ask according to your experience…is the difference between the LED strip and the actual monitor colors noticeable? I mean at the point where the LED strip will have a different color than the monitor.
    Also, I’m reading that using a faster micro-controller won’t help much because the code is already lightweight but I was thinking of using 2 or even 3 Arduinos (1 for both the sides and 2 for the top and bottom). Most likely it won’t make any difference but let’s say I do it how do I mix them all in the Prismatik software?

    1. If you haven’t already, I’d recommend reading through the entire build series for my ambilight. It should answer most of your questions.

      The big limitation speed-wise is the throughput of the virtual serial port. Prismatik doesn’t support multiple serial outputs; you can’t run 2 or 3 Arduinos without some sort of go-between.

  4. Hi Dave,
    You were right yeah after I read the build I think I will give it a go.
    Definitely the more LEDs will add more latency but I still believe it won’t be bad. The 60 leds/m seems pretty ok to me from the video and from what you describe. Hopefully 144 perform the same.
    I’m trying the software now but Prismatik only allows up to 99 leds. Horizontally I need 108 and ideally 112. Vertically I need 43 but the best would be 49. How can I allow more than 99 leds per direction on Prismatik ? Ambibox allows 300 zones max. and I need ideally 322. Bambilight allows 100 per direction so it’s still less. Hyperion allows more but it only works with Raspberry Pi? I can’t find any guide with Arduino. There’s seem to be a version of Ambibox which allows up to 400 zones(leds) but it’s not available in the public. Only the guy who modded it has and he doesn’t seem to be active anymore. Any idea?


    1. If the software doesn’t exist, you’ll probably need to program it yourself. As a stop-gap you could modify some driver software to make logical groups of LEDs running off the same color data, which would allow you to use any of that software.

      Although again I’d recommend not attempting to build an ambilight setup with that many LEDs for a variety of reasons.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.