I recently made a table which had and rgb auto-color changing ambilight. Then I had another Idea to make the lights music reactive. But sometimes I wanted a constant color , which does not change. It was good, but quite impractical, as I had to reupload the code everytime to the Arduino and it was quite a hastle.
So I got a solution. I used a push button to toggle through different modes of the light. The ambilight mode looked like this:
The color was not constant , it changed smoothly. The rgb strip was a 8 bit version, meaning that 3 colors , with intensity of 0 to 255, make upto 16,777,216 (which is 256 ^3). Why so many colors? let’s say the rgb value is (255,255,255) which is white, but if i make it into (255,255,254) the LED appears white but it is an entire different color.
I later added a bluetooth module and made a mobile application for my music reactive light mode.
The only problem with this was that I had to use my PC and run a python script to make it of use.
I don’t know much java or kotlin programming to make an app for android, but a website called kodular makes it easier, it provides block-programming, which is generaly not a good idea for huge projects, but as this was a support app, so i used block programming.
It had the same features as the python script with additional support for data-transfer-over-bluetooth speed control and mic sensitivity control.
The app was very simple looking, infact way to simple, and it would look better if it was done with Android Studio, but it did not seem worth the time to learn a completely new programming language.
The connect button is for connecting to the smart table and the start and stop button are for toggling the state of the lights, data-transfer, and microphone use. The MAX_OUT slider is for sensitivity and CLOCK_INTER is data transfer speed in milliseconds, with 1 being the fastest.
The Schematics are:
The led shown in the picture is a cathode rgb-led, and a rgb led strip would also work , The led strip “ws2812b” won’t work as that is an individual addressible led strip, whereas mine isn’t.
I will write another post on this as I have made one major extention that makes this Smart Table “Smart”. I will also upload the code.