Global for LED order (i.e. reverse) #70
Replies: 1 comment
-
I know this is a couple of years late, but in case any other halloweeners are coming up, here's a recipe worth knowing: The variable you seek is in include/config.h. It's named COLOR_ORDER eith EOrder::GRB being the correct order for all the official WS2812's and any of the WS2811's and EOrder::RGB being the right answer for a few clones. I don't agree with it, but it's a trait of the effect/project you're building and not really of the build you're making, but if you know you're making a custom effect in globals.h, that's the variable to set. Unfortunately, the LED code the project uses makes it a compile-time requirement to use and cases like having multiple strips using different orders just gets really hairy, but that's the basic hint that someone needs to get this going for the majority of the "simple" halloween/effect projects. It's not suspenders, but there's a BELT project in globals.h but not in the *.ini and all it does is set a simple effect in src/effects.cpp One working on a project similar to yours (and Dave's) might set #define COLOR_ORDER EOrder::RGB in the #if BELT block of config.h and then make a custom_belt.ini that did something like: [env:belt] to run that single effect in that exact MCU. Or you can slice it up and go wild. I think I've highlighted the key places to cut: a custom platform_foo.ini to bind an effect to a platform, globals.h to do all the things that (IMO) should have been done in the .ini, and src/effects.cpp to pull in the list of effects that you want to run on that combination. Have fun. |
Beta Was this translation helpful? Give feedback.
-
It would be super nice if there was a global variable to set for LED order. I'm planning on using all of this for a wearable halloween costume (attached to a pair of suspenders). The ability to easily reverse the order of the LEDs makes the wearable applications much easier to plan as I can easily shove my USB powerpack in my back pocket along with wiring.
I'll try to work on this but I'm too much of a n00b to make this sort of feature functional in time for halloween.
Beta Was this translation helpful? Give feedback.
All reactions