This is an example on how to use an OLED display to display the VU meters and mute/solo states of the eight first tracks, by using the Arduino as a Mackie Control Universal. This is an example modified to work with the ESP32 only, using MIDI over Bluetooth Low Energy.
Add a capacitor between the reset pin of the display and ground, and a resistor from reset to 3.3V. The values are not critical, 0.1µF and 10kΩ work fine.
You do need some way to reset the display, without it, it won't work.
Alternatively, you could use an IO pin from the ESP32 to reset the display, but this just "wastes" a pin.
The first display should now display the level meters and mute/solo states of the first 8 tracks.
Map "Control Surface" as a Mackie Control Universal unit in your DAW.
constexpr uint8_t SCREEN_WIDTH = 128;
constexpr uint8_t SCREEN_HEIGHT = 64;
constexpr int8_t OLED_DC = 15;
constexpr int8_t OLED_reset = -1;
constexpr int8_t OLED_CS = 2;
Adafruit_SSD1306 ssd1306Display = {SCREEN_WIDTH, SCREEN_HEIGHT, &SPI,
OLED_DC, OLED_reset, OLED_CS,
SPI_Frequency};
public:
MySSD1306_DisplayInterface(Adafruit_SSD1306 &display)
if (!disp.begin())
}
disp.drawFastHLine(0, 52, 128, WHITE);
disp.drawRect(0, 0, 128, 64, WHITE);
}
} display = ssd1306Display;
};
};
{1, decay},
{2, decay}, {3, decay}, {4, decay}, {5, decay},
{6, decay}, {7, decay}, {8, decay},
};
{display, VUMeters[0], {2 + 16 * 0, 50}, 12, 3, 1, WHITE},
{display, VUMeters[1], {2 + 16 * 1, 50}, 12, 3, 1, WHITE},
{display, VUMeters[2], {2 + 16 * 2, 50}, 12, 3, 1, WHITE},
{display, VUMeters[3], {2 + 16 * 3, 50}, 12, 3, 1, WHITE},
{display, VUMeters[4], {2 + 16 * 4, 50}, 12, 3, 1, WHITE},
{display, VUMeters[5], {2 + 16 * 5, 50}, 12, 3, 1, WHITE},
{display, VUMeters[6], {2 + 16 * 6, 50}, 12, 3, 1, WHITE},
{display, VUMeters[7], {2 + 16 * 7, 50}, 12, 3, 1, WHITE},
};
{display, mute[0],
XBM::mute_7, {4 + 16 * 0, 54}, WHITE},
{display, mute[1],
XBM::mute_7, {4 + 16 * 1, 54}, WHITE},
{display, mute[2],
XBM::mute_7, {4 + 16 * 2, 54}, WHITE},
{display, mute[3],
XBM::mute_7, {4 + 16 * 3, 54}, WHITE},
{display, mute[4],
XBM::mute_7, {4 + 16 * 4, 54}, WHITE},
{display, mute[5],
XBM::mute_7, {4 + 16 * 5, 54}, WHITE},
{display, mute[6],
XBM::mute_7, {4 + 16 * 6, 54}, WHITE},
{display, mute[7],
XBM::mute_7, {4 + 16 * 7, 54}, WHITE},
};
{display, solo[0],
XBM::solo_7, {4 + 16 * 0, 54}, WHITE},
{display, solo[1],
XBM::solo_7, {4 + 16 * 1, 54}, WHITE},
{display, solo[2],
XBM::solo_7, {4 + 16 * 2, 54}, WHITE},
{display, solo[3],
XBM::solo_7, {4 + 16 * 3, 54}, WHITE},
{display, solo[4],
XBM::solo_7, {4 + 16 * 4, 54}, WHITE},
{display, solo[5],
XBM::solo_7, {4 + 16 * 5, 54}, WHITE},
{display, solo[6],
XBM::solo_7, {4 + 16 * 6, 54}, WHITE},
{display, solo[7],
XBM::solo_7, {4 + 16 * 7, 54}, WHITE},
};
void setup() {
}
void loop() {
}