Hi there,
I'm fairly new to programming so thought I'd ask for the best approach to my situation and hopefully some pointers on the way.
Background;
I am building custom lighting for my car using WS2812B Led Strips on the rear so I can have effects such as scrolling lights when indicating etc. Currently I have a custom wiring loom for all the cars lighting etc. and have created an array for each rear light on Glediator and NLED Matrix to see its operation.
My problem comes with how I'm going to control the function of the lights. What I have set up is a digital input pin connected to each of the lighting functions and essentially a karnaugh map with how the lights should respond. For example when brakes are pressed the bottom 2 rows of the led array are lit red(in theory). I have tested this out by cycling through all the possible input combinations to ensure the lights should behave as expected and having an output led blink at a set rate for each function. The difficult part comes in replacing the led with the WS2812.
I have looked into Bit Banging for each function which works as far as I have got but is very tedious due to the amount of LED's involved. Is there a better more efficient way to essentially tell each led what to do without having to address all the LEDs for every function or a way to create a function that gives a specific output? (e.g Leds 1-20 Red, 40-60 White)
The second problem I have is that I would like an override function for the likes of shows where I can essentially tell the Strips what to do on the fly. I have thought of a few approaches to this but am sure someone may know an even better one. In the Arduino code I have included an extra input that acts as an override, essentially a button that when high will allow the arduino to start listening for communications, possibly I2C or UART/USB etc. that will allow the Strips to be controlled.
This is where my second idea comes into play. I am installing Autopi on an Rpi so the car has diagnostics etc. but with Autopi you also have the option to create custom modules. I was thinking of replacing the physical override button with an output from the Rpi module that could open communication and essentially have a similar interface as the likes of hyperion with the colourwheel to change the lights to a desired colour or effect. How difficult would this be? Has anyone made such a module? I have seen modules with sliders but love the way the hyperion colourwheel is laid out.
My final problem which isn't really too much of a concern but would be nice to implement for completion sake is RGB control of the front lights. The rear lights are WS212B for the functionality such as scrolling etc, however, the fronts are projector lights and to keep everything road legal I was going to use RGBW Bulbs so I can retain the brightness when on the road and be able to use the RGB function when the system is in the override state. I was thinking of controlling the RGB's with the Arduino (through MOSFETs) at the same time as bitbanging the WS2812B but im fairly sure this would throw the timing out of whack, so the second idea was to somehow get the colour module to give the RGB's identical values as the WS2812 Strip, so if the module gave the SW strip the command #FF0000, the Rgb's would also get the equivelant command 255,0,0.
Sorry for the essay, Its a fair learning curve but im picking it up fast.
Also, i'm not specifically tied to the WS2812''s, its just what i have at hand, if using the likes of 2801's would reduce the complexity I'd happily switch, i wouldn't mind using APA102's but the price here is steep considering i'd need around 200 per light, but if it helps i'd probably just bite the bullet and get them.
Any Info/Feedback would be greatly appreciated!
Thanks
Michael