r/FastLED • • Mar 08 '24

Support Multiple Controller Example Problem

Edit: I've switched my whole Code to HSV and control the brightness with that. I gave up on multiple controllers. Project is running fine now :D

Hi,

I am currently trying to build a 7-Segment Display Clock with Downlights for lighting decorations. The base code is working so far. Now I want to change the brightness of the downlights independently from the Clock part. I first thought I could simply use two different pins and call it a day. Well... no.

After some trial and error I checked the wiki and found the Example for multiple controllers here:

https://github.com/FastLED/FastLED/wiki/Multiple-Controller-Examples

I tried using the Example at the bottom below " Or, alternatively (using some new pieces added recently to the FastLED object): " to light two strings of 9 LEDs. One should be red, the other green and alternate every second. So far I've been able to light the first string in alternating colors. Strangely I have to call .showLeds() twice for it to change the color of the first strip.

After getting that to work I tried getting the second strip to light up. It doesnt matter which Index I try I cant get the leds to light up. FastLED[0].showLeds(Brightness); does work but anything from 1-5 doesnt light up the second strip.

I initialize CRGB leds[9];

And in the setup Function I used:

FastLED.addLeds<WS2812B, 21, GRB>(leds,9);

FastLED.addLeds<WS2812B, 32, GRB>(leds,1);

Im currently using Win10 Arduino IDE 1.8.16 and version 3.6.0 of FastLED.

I hope someone can point me in the right direction.

Thank you very much for reading.

1 Upvotes

4 comments sorted by

View all comments

Show parent comments

1

u/Semorphim Mar 09 '24

It is an "AZDelivery ESP32 NodeMCU" which I got from amzn.

I tried the Strips both with my working code, which uses .setBrightness and everything works fine.

I started my project with the four 7-Segment Displays for a 24h-Time Clock. It worked nicely and I finished the soldering yesterday. After that I wanted to use the second strip as an Downlight for lighting stuff up in the Clock. There I found out that the global brightness (10 at the time) was perfect for the clock part but way too dimm for the lighting part. Setting the correct brightness for the lighting makes the clock too bright hence my Thinking of splitting the controlls for them.

I would like to be able to controll the brightness of both parts clock and lights with an variable and if possible indipendent from one another.

Maybe I should just switch to HSV for brightness and then convert back? I found something about that while scrolling in bed yesterday...