#include <Arduino.h>
// Eight-button MIDI pad → USB serial lines for the esp32-midi-pad playground.
// Wire each button: GPIO → switch → GND (internal pull-ups enabled).
// Protocol: NOTEON:<note>:<velocity> NOTEOFF:<note>
static const uint8_t BTN_COUNT = 8;
static const uint8_t BTN_PINS[BTN_COUNT] = {13, 14, 27, 26, 25, 33, 32, 23};
static const uint8_t BTN_NOTES[BTN_COUNT] = {60, 62, 64, 65, 67, 69, 71, 72};
bool pressed[BTN_COUNT] = {false};
void setup() {
Serial.begin(115200);
for (uint8_t i = 0; i < BTN_COUNT; i++) {