I love messing with addressable RGB leds and it often annoys me that to control them we need to install bloated, invasive and/or inefficient applications. Products that ship with "RGB" often require account creation and web applications for basic functionality.
I set out to build a small prototype with the key feature being a live-reload render function supported by raylib.
The prototype would consist of three parts:
- A windows application made with raylib
- A led receiver to receive data from the application
- An "underglow" setup installed on my vehicle
The Good News:
- We have a live-reload function that updates leds
- We successfully made an led receiver (more on this in tech section)
- We shot some footage of the app working in the wild. In fact, the original goal was to release a build vlog of the day I installed the leds and shot some footage however this will be delayed till after the jam.
The Bad News:
- No raylib functions can be called from hot-reload dll. Unfortunately I couldn't figure out how to get it to work :(
- The led strips I soldered initially worked fine, but after a couple tests began outputting incorrect data. Therefore the colours of the leds no longer matched the application. This was definitely a hardware issue as the app worked great with other strips, but since I did not prepare those strips for the underglow I ran out of time to swap the broken strips with working ones.
The Grand Adjustment
So I figure since I failed at my initial goal of a live-reload raylib function (in fact I failed at quite a lot during this project and got pretty salty), I would add some music reactivity to spice things up. One problem I encountered is I had never implemented any of this in C, plus I was new to raylib so progress was slow. I ended up getting a simple bass reactive mode working, and a glaringly sparse setup page (the orientation buttons dont even do anything, just for show). But overall I believe it conveys the intended use case.
Additionally, near the end of the jam I had the idea to create a mini build vlog of installing and running the app. I have all the footage but didnt realize my PC isnt up to the task of editing 4K footage (should've shot in 1080p). I will probably release a couple of vids, but the full video might follow after the jam and when I'm able to upgrade my PC. Here's the intro to the build vlog, incase I never get around to it. I'm from Auckland New Zealand - so the big tower you see is the Sky Tower.
Pics or it didnt happen:
Custom Render Function
Bass Frequency VU Mode
In the field :D
Hardware Receiver (just an esp8266 dev board with buck regulator)
The Tech (key aspects)
- Raylib/raygui application that blasts udp packets to esp
- WASAPI loopback audio reactivity
- Live Reload custom render function
- 3D printed enclosure modeled in OpenSCAD
- esp8266 with a slightly modified version of This firmware. The esp acts as an access point and waits for udp packets to render straight to the strip
- 2 extremely jank led strips soldered and attached to the vehicle in dubious ways
- Raylib ended up being a bad choice, I couldnt figure out how to hot-reload the library, and once I added windows native stuff like WASAPI - the cross platform nature of the library became irrelevant. Raylib ended up being just a UI library and PNG loader for me.
- I learned the importance of having my own UI library in C. If I had this available for the jam, I would've been more successful. Perhaps I should've seen this coming for the Wheel Reinvention Jam lol.
- I should've verified that all file formats and resolutions I was planning to shoot my video with - was actually editable by my hardware - huge oversight.