As someone new to the world of FastLED, am trying to figure out how to address a subset of LED’s in a WS2812B. Here’s what I’m trying to do with the Arduino connected.
I’m trying to make a color organ that lights up different LED’s depending on the amplitude of the signal.
Lets say I have a strip that has 30 LED’s. I want to set LED 0-9 to Blue, 10-19 Red, 20 - 29 Green…based on an analog input. When the amplitude of the input changes, I want to set 0-7 Blue, 10-14 Red, and 20-26 green.
I’ve only been able to find information on changing strips or multiple strips connected to different outputs. Any suggestions of where to look for sample code? Thanks.
The LEDs are setup in an array. Your code can modify the array however you want. In this case you would set 0-7 to Blue, 8-9 to Black, …
This can be done in a for loop with conditions.
I’m using a MSGEQ7 to sample the music and drive digital outputs on the Arduino, but the trick is to merge the outputs to 7 different strings of WS2812. I’m wanting to use 20 led’s for each of the seven channels, and map the A/D input so that the number of LED’s that are lit in each channel is porportional to the strength of the audio for that channel. If I can get that to work, would look at varying the brightness too if the processing is fast enough.