AwesomeStudioPedal
A programmable, multi-profile foot controller for DAWs, score readers, and studio automation
Loading...
Searching...
No Matches
esp32/include/builder_config.h
Go to the documentation of this file.
1#pragma once
2#include <cstdint>
3
4// ===================================================================
5// BUILDER CONFIGURATION — ESP32 (NodeMCU-32S)
6// Edit these values to match your hardware wiring, then rebuild.
7// Invalid combinations will produce a build error with a description.
8// ===================================================================
9
10// Number of profiles this build uses
11static constexpr uint8_t CONF_NUM_PROFILES = 7;
12
13// Profile-select LEDs wired. Maximum profiles = 2^n − 1.
14// 1 LED → up to 1 profile
15// 2 LEDs → up to 3 profiles
16// 3 LEDs → up to 7 profiles
17// 4 LEDs → up to 15 profiles
18// 5 LEDs → up to 31 profiles
19// 6 LEDs → up to 63 profiles
20static constexpr uint8_t CONF_NUM_SELECT_LEDS = 3;
21
22// Action buttons wired (A through Z, max 26)
23static constexpr uint8_t CONF_NUM_BUTTONS = 4;
24
25// GPIO pin assignments
26static constexpr uint8_t CONF_LED_BLUETOOTH = 26;
27static constexpr uint8_t CONF_LED_POWER = 25;
28static constexpr uint8_t CONF_LED_SELECT[] = { 5, 18, 19 }; // CONF_NUM_SELECT_LEDS entries
29static constexpr uint8_t CONF_BUTTON_SELECT = 21;
30static constexpr uint8_t CONF_BUTTON_PINS[] = { // CONF_NUM_BUTTONS entries
31 13, // A
32 12, // B
33 27, // C
34 14 // D
35};
36
37// ===================================================================
38// VALIDATION — build fails here if your configuration is invalid.
39// Read the message to understand what needs to change above.
40// ===================================================================
41
42static_assert(CONF_NUM_SELECT_LEDS >= 1 && CONF_NUM_SELECT_LEDS <= 6,
43 "CONF_NUM_SELECT_LEDS must be between 1 and 6.");
44
45static_assert(CONF_NUM_PROFILES >= 1 &&
46 CONF_NUM_PROFILES <= (1u << CONF_NUM_SELECT_LEDS) - 1u,
47 "CONF_NUM_PROFILES exceeds what your select LEDs can display. "
48 "Either reduce CONF_NUM_PROFILES or wire more select LEDs (CONF_NUM_SELECT_LEDS).");
49
50static_assert(CONF_NUM_BUTTONS >= 1 && CONF_NUM_BUTTONS <= 26,
51 "CONF_NUM_BUTTONS must be between 1 and 26 (A-Z).");