Button pins
The MacroBoard uses seven GPIO pins for button inputs, configured with internal pull-up resistors.GPIO 4
Toggle shuffle mode on/off in Spotify playback
GPIO 5
Decrease playback volume
GPIO 12
Increase playback volume
GPIO 13
Toggle repeat/loop mode in Spotify
GPIO 14
Skip to previous track
GPIO 25
Toggle play/pause state
GPIO 26
Skip to next track
I2C pins
The OLED display uses the I2C protocol for communication.GPIO 21
I2C data line for OLED display communication
GPIO 19
I2C clock line for OLED display communication
The I2C bus runs at 400 kHz for faster display updates.
LED pin
GPIO 18
WS2812B RGB LED strip data pin
RGB LED configuration
The MacroBoard uses an addressable LED strip for visual feedback.LED strip specifications
LED strip specifications
OLED display configuration
The display uses the SSD1306 driver with I2C communication.Display specifications
Display specifications
Pin initialization
All button pins are configured as inputs with internal pull-up resistors enabled. The buttons should connect the GPIO pin to ground when pressed.Hardware connections
Button wiring
Each button should be wired as follows:- One terminal to the GPIO pin
- Other terminal to GND
- No external resistors needed (internal pull-ups are used)
LED strip wiring
- Data: GPIO 18
- VCC: 5V power supply
- GND: Common ground with ESP32
OLED display wiring
- SDA: GPIO 21
- SCL: GPIO 19
- VCC: 3.3V or 5V (depending on display module)
- GND: Common ground with ESP32