Ok, well I think you need to approach this project from the top down. That is to say, choose some lights that are easy to fit, and work back from there. I don't think you can just focus on the software (although it's pretty easy) and hope that everything else will fall into place.
I think you need to choose your user interface, where you are going to put the control box, where you are going to put the lights, and how many are there, and how you are going to run the wires. You don't need a final design, just some ideas so that you don't hit any unsurmountable problems during the project.
This set seems to be popular, and the same design seems to pop up with different names:
https://www.amazon.com/AINBIN-Emergency ... 0D764KHFK/
I guarantee that there is the cheapest 8-bit micro in the control box, and that there are eight wires going to the lights. Four to the left, and four to the right. Each wire turns on one group of four LEDs in the unit. In other words each unit has four groups of four LEDs, not 16 individually addressable LEDs.
You could buy two sets, one for the front window, and one for the back. Then wire the back set in parallel with the front set so that they show the same pattern.
Buying a manufactured unit and modifying it is probably easier than building everything yourself, but you have to know how to build everything yourself so that you know what is already covered by the unit you bought, and what you changes you need to make.
In the case of the linked Amazon product I'd suspect that the 12V power goes to the control box, where it's regulated down to 5V for the microcontroller, and also to the two LED assemblies. I'd expect to see four high-current drivers in each of the assemblies, which drive the LEDs from the 12V supply, but are triggered by 5V signals from the micro. These same signals also drive the eight mimic LEDs on the control box.
Therefore, assuming I'm right, it would be easy to remove the control box and drive the LEDs from an Arduino. If you can drive the LEDs from an Arduino it's trivial to hook up a 4-way switch to select a pattern, and a pushbutton for extra attention. I would certainly spend $39.99 on a unit to dismantle and experiment with.
Software is easy. I'd have a counter which counts up to 16 or 32, say, then four tables in memory containing the LED patterns (a bunch of 8-bit values). The counter would count up every 1/10th of a second, or something. Then all you do is use the front panel 4-way switch to choose the table, use the counter to choose the current LED values, and write them to the GPIO pins. Optionally check the boost pushbutton and overwrite the LED values with "all on" or whatever.
I think you need to choose your user interface, where you are going to put the control box, where you are going to put the lights, and how many are there, and how you are going to run the wires. You don't need a final design, just some ideas so that you don't hit any unsurmountable problems during the project.
This set seems to be popular, and the same design seems to pop up with different names:
https://www.amazon.com/AINBIN-Emergency ... 0D764KHFK/
I guarantee that there is the cheapest 8-bit micro in the control box, and that there are eight wires going to the lights. Four to the left, and four to the right. Each wire turns on one group of four LEDs in the unit. In other words each unit has four groups of four LEDs, not 16 individually addressable LEDs.
You could buy two sets, one for the front window, and one for the back. Then wire the back set in parallel with the front set so that they show the same pattern.
Buying a manufactured unit and modifying it is probably easier than building everything yourself, but you have to know how to build everything yourself so that you know what is already covered by the unit you bought, and what you changes you need to make.
In the case of the linked Amazon product I'd suspect that the 12V power goes to the control box, where it's regulated down to 5V for the microcontroller, and also to the two LED assemblies. I'd expect to see four high-current drivers in each of the assemblies, which drive the LEDs from the 12V supply, but are triggered by 5V signals from the micro. These same signals also drive the eight mimic LEDs on the control box.
Therefore, assuming I'm right, it would be easy to remove the control box and drive the LEDs from an Arduino. If you can drive the LEDs from an Arduino it's trivial to hook up a 4-way switch to select a pattern, and a pushbutton for extra attention. I would certainly spend $39.99 on a unit to dismantle and experiment with.
Software is easy. I'd have a counter which counts up to 16 or 32, say, then four tables in memory containing the LED patterns (a bunch of 8-bit values). The counter would count up every 1/10th of a second, or something. Then all you do is use the front panel 4-way switch to choose the table, use the counter to choose the current LED values, and write them to the GPIO pins. Optionally check the boost pushbutton and overwrite the LED values with "all on" or whatever.
Statistics: Posted by ame — Thu Sep 12, 2024 9:17 pm