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
Esp32Application
folder and copy or rename the fileBoardOverride_template.h
toBoardOverride.h
and change any pin definitions in there if needed. - Install PlatformIO.
- Execute one of the following:
platformio run
to only build.platformio run --target upload
to build and upload on to the ESP32 module (don't forget to hold the IO0 button).
Execute one of the following:
platformio run -e tests
to build and run all unit tests.platformio run -e tests --target [TestName]
to build and run only that test suite (e.g. ProcessingChainTest).platformio run -e tests --target memcheck
to build and run all unit tests under valgrind (currently doesn't work correctly).
This currently only supports Mac.
Execute platformio run -e pc
to build and .pioenvs/pc/program
to run.