This project implements a USB MIDI controller using the STM32F103C8T6 “Blue Pill” board and libopencm3 midi usb Examples.
It uses a TTP229 16-key capacitive touch keypad as the input source and sends MIDI messages over USB.
- MCU Board: STM32F103C8T6 ("Blue Pill")
- Input Sensor: TTP229 16-key touch sensor (I²C mode)
| TTP229 Pin | STM32F103C8 Pin |
|---|---|
SDO |
PA6 |
SCL |
PA7 |
TP2 |
Connected |
TP3 |
Connected |
TP4 |
Connected |
VCC/GND |
3.3V / GND |
The TP2, TP3, and TP4 pins on the TTP229 side are connected to configure the sensor for 16-key mode and multitouch function.
Make sure you have the following toolchain
sudo apt install stlink-tools gcc-arm-none-eabi
git clone --recurse-submodules https://github.com/arbipink/midi-project-with-ttp229-and-stm32-using-libopencm3.git midi-project
first build libopencm3 (only needed once)
cd midi-project
make -C libopencm3
then build the project
make -C my-project
cd my-project
st-flash --reset write midi-project.bin 0x8000000
- Add functionality to change octave
- Add functionality to control midi cc
- Change from polling driven to interrupt driven for the keys
- This project’s source code: MIT License
- libopencm3 dependency: LGPL v3.0 or later