This is the code of the second generation controller for my MIDI based keyboard LED strip, which makes different LEDs shine based on the notes I play. It is currently work in progress.
I started the redesign because I found that the first version was not extensible enough anymore, both in terms of hardware and software. The first version has some light effect "patches" (presets with different colors) hard-coded into the firmware, together with the MIDI program numbers they respond to. This means that adding or changing a patch means C coding, recompiling and flashing the chip. The plan is a fully configurable version, so I can make and edit light effect patches from my smartphone or notebook, even last-minute when everything is already setup on stage and the show is about to begin.
I'm an embedded software engineer, and like to make the most out of limited hardware (like the AVR microcontroller which runs the previous version). However, my time to hobby around is also limited, and I prefer C++ for embedded now, because of the object-oriented nature of the language. There's enough cheap hardware around which has enough memory and is powerful enough to make use of these advantages.
- Go to the
Esp32Applicationfolder and copy or rename the fileBoardOverride_template.hpptoBoardOverride.hppand change any pin definitions in there if needed. - Install PlatformIO.
- Execute one of the following:
platformio runto only build.platformio run --target uploadto build and upload on to the ESP32 module (don't forget to hold the IO0 button).
Tip
You can instead use the PlatformIO IDE or the PlatformIO extension for your favorite IDE to build.
Note
The unit tests will also be run by default. For this, you need to have a compiler available on your system to compile native code. See PlatformIO native platform.
This currently only supports Mac.
Execute platformio run -e pc to build and .pioenvs/pc/program to run.