Hey there, got up and running with a nodemcu 1.0 board, 2811 light strip,

Hey there, got up and running with a nodemcu 1.0 board, 2811 light strip, and FastLED sketch from here: https://github.com/bruhautomation/ESP-MQTT-JSON-Digital-LEDs/blob/master/ESP_MQTT_Digital_LEDs/ESP_MQTT_Digital_LEDs.ino

So it all works great (well other then the connectors suck and I keep losing signal, another post about that later)

What I really would love some help with is something super simple. I want to be able to set a static colors for each of the corners as well the centers a different color as well. That’s it. I have 78 drivers each powering 3 pixels. I tried to figure it out but failed to understand the existing sketch very well.

I know what I want to do is super basic so I am hoping someone can get me started in the right direction. The overall idea is for example with 4th of July have a static layout of colors red, white, and blue. For game day have team colors, etc… I figured I would create each as a effect.

Thanks in advance and super awesome project you guys and gals have here!

Looks great! What have you tried so far? You should just be able to set the leds like:

leds[0] = CRGB::Red;

Post any attempts you’ve made in code at http://gist.github.com or http://pastebin.com (not in the comments here), and you’re more likely to get help.

Will give it a shot, but if I understand correctly,

leds[0] = CRGB::Red;

Would be the first driver is red?

Then could I do

leds[1] = CRGB::Blue;

and so on?

also is it possible to define a range like:

leds[0-49] = CRGB::Red;

for the first 50? Sorry I don’t know C, mostly a nodejs kind of guy. ** I think that would cause a math operation which I dont want but would I have to define each of the 78 drivers directly (which I can do if I have to)

Once I have that basic understanding I can get to work and show an example on http://pastebin.com

Yeah, exactly. For ranges, you can either use a for loop:

for(byte i = 0; i < 50; i++) {
leds[i] = CRGB::Red;
}

Or you can look at using RGBSet: https://github.com/FastLED/FastLED/wiki/RGBSet-Reference

Thanks Jason, just want I needed to know. Feel kind of silly now not thinking C had for loops lol… Ill test things out later and report back.

Here’s an example using CRGBSet you can use for reference or modify to your pixel type and NUM LEDS and try out.

This is an additional routine for demoreel for the holiday. https://gist.github.com/brontide/34eab8071e69f28e368af7e01cd3466e

Thanks again Gentleman! Been a busy few days and going out of town in a day or two but going to try them all out, will post what I come up when I return. This was exactly the help I needed to craft something