

Cyberbrick breakout
This project targets ESP32-C3 BLE gamepad mode by default.
- Size
- 73 × 41 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 34
- Nets
- 24
- Pads
- 128
- Tracks, vias
- 0, 0
- Pours
- 1
- Routed
- Not yet
- KiCad
- KiCad 9.0 (file 20241229)
- Created
- 15 Apr 2026
- Updated
- 6 May 2026
Overview
Cyberbrick breakout is an open-source printed circuit board by mybesttools, from the mybesttools/esp32-c3-arcade repository on GitHub. It is a 2-layer board of 73 × 41 mm with 34 parts on 24 nets.
Its parts include 22 connectors, 5 capacitors and 2 ICs. It belongs with the interfaces and adapters boards and the ESP32 and RISC-V boards of this library.
README
README.mdESP32-C3 Controller Firmware
This project targets ESP32-C3 BLE gamepad mode by default.
The board advertises as ESP32-C3 Arcade and pairs directly with RetroPie over Bluetooth.
It also includes an optional tiny OLED status display (SSD1306 I2C) showing:
- boot status
- advertising / connected state
- live axis and button activity
BLE and USB support
Yes, both are supported from the same codebase:
- BLE gamepad mode on ESP32-C3 (
esp32c3_esp32c3_ble) - USB serial bridge mode on ESP32-C3 (
esp32c3_esp32c3_usbserial)
Note: ESP32-C3 does not expose native USB HID gamepad device mode in this project. USB mode here is CDC serial output for a Pi-side bridge.
Project layout
src/main.cpp: controller firmware (BLE + USB HID + serial bridge modes)include/pinmap.h: joystick/button mapping and calibrationplatformio.ini: PlatformIO build configtools/flash_our_firmware.sh: upload helper for default ESP32-C3 BLE env
Pinouts
Config B — single joystick, direct GPIO buttons (default)
Environments: esp32c3_esp32c3_ble, esp32c3_esp32c3_usbserial
Joystick (analog, connect to 3.3 V, GND, and wiper):
| Signal | GPIO | Arduino pin |
|---|---|---|
| JOY X | GPIO0 | A0 |
| JOY Y | GPIO1 | A1 |
Buttons (active LOW — wire between GPIO pin and GND, internal pull-up enabled):
| Button | GPIO |
|---|---|
| A | 2 |
| B | 3 |
| X | 4 |
| Y | 5 |
| L | 6 |
| R | 7 |
| START | 9 |
| SELECT | 10 |
| HOTKEY | 20 |
| COIN | 21 |
OLED status display (I2C, shared with Config A):
| Signal | GPIO |
|---|---|
| SDA | 5 |
| SCL | 6 |
Note: GPIO5/6 are shared between the OLED and button Y/L in Config B. If the display is connected, remove buttons Y and L from the
BUTTON_PINS[]array ininclude/pinmap.h, or remap them to unused GPIOs.
Config A — dual joystick, MCP23017 expander board
Environments: esp32c3_ble_mcp
All buttons are wired to the MCP23017 I/O expander (no direct GPIO buttons).
The MCP23017 connects over I2C with A0/A1/A2 address pins all tied to GND
(address 0x20).
Joysticks (analog, connect to 3.3 V, GND, and wiper):
| Signal | GPIO | Arduino pin | Role |
|---|---|---|---|
| Left JOY X | GPIO0 | A0 | Hat switch |
| Left JOY Y | GPIO1 | A1 | Hat switch |
| Right JOY X | GPIO2 | A2 | BLE Rx axis |
| Right JOY Y | GPIO3 | A3 | BLE Ry axis |
I2C bus (MCP23017 + OLED share the same bus):
| Signal | GPIO | Connected to |
|---|---|---|
| SDA | 5 | MCP23017 SDA, OLED SDA |
| SCL | 6 | MCP23017 SCL, OLED SCL |
MCP23017 button mapping (active LOW — wire each button between the MCP pin and GND; internal pull-ups are enabled by firmware):
| MCP pin | Board label | Button | Notes |
|---|---|---|---|
| GPA0 | A0 | D-pad Up | ✓ wired |
| GPA1 | A1 | D-pad Left | ✓ wired |
| GPA2 | A2 | D-pad Right | ✓ wired |
| GPA3 | A3 | D-pad Down | ✓ wired |
| GPA4 | A4 | L shoulder | wire here |
| GPA5 | A5 | R shoulder | wire here |
| GPA6 | A6 | Start | wire here |
| GPA7 | A7 | Select | wire here |
| GPB0 | B0 | Hotkey | wire here |
| GPB1 | B1 | Coin | wire here |
| GPB2 | B2 | R3 (right joystick click) | ✓ wired |
| GPB3 | B3 | L3 (left joystick click) | ✓ wired |
| GPB4 | B4 | A / Cross ✕ (Down) | ✓ wired |
| GPB5 | B5 | Y / Triangle △ (Up) | ✓ wired |
| GPB6 | B6 | B / Circle ○ (Right) | ✓ wired |
| GPB7 | B7 | X / Square □ (Left) | ✓ wired |
Optional tiny OLED display
The BLE environment enables status output (ESP32C3_STATUS_OLED).
For ABrobot ESP32-C3 OLED boards, the onboard 0.42" display is a 72x40 pixel OLED driven over I2C on GPIO5 (SDA) / GPIO6 (SCL).
Reference article: ESP32-C3 0.42" OLED — emalliab
Key findings from debugging:
- Board I2C address may be 0x3C or 0x3D depending on variant — firmware probes both.
- Display controller may be SSD1306 or SH1106 — both U8g2 drivers are included.
Wire.begin()with no arguments on ESP32-C3 defaults to GPIO8/GPIO9, which conflicts with the onboard LED on GPIO8. Always pass explicit SDA/SCL pins.- The article uses
U8G2_SSD1306_72X40_ER_F_HW_I2Cwhich works without offset. TheU8G2_SSD1306_128X64_NONAMEvariant also works with offset (30, 12).
Default config is in include/pinmap.h:
STATUS_DISPLAY_ENABLED = falseSTATUS_OLED_I2C_ADDR = 0x3CSTATUS_OLED_USE_SH1106_72X40 = trueSTATUS_OLED_SDA_PIN = 5STATUS_OLED_SCL_PIN = 6
Note: ABrobot SH1106 72x40 panels are not SSD1306-compatible and need SH1106 command mode.
If your display has different dimensions or address, change those constants.
Setup — step by step
1. Build and upload to ESP32-C3
cd firmware/esp32c3-usb-gamepad
pio run -e esp32c3_esp32c3_ble
pio run -e esp32c3_esp32c3_ble -t upload
# USB serial bridge firmware
pio run -e esp32c3_esp32c3_usbserial
pio run -e esp32c3_esp32c3_usbserial -t uploadIf needed, upload with explicit port:
pio run -e esp32c3_esp32c3_ble -t upload --upload-port /dev/tty.usbmodemXXXXOr use the helper script:
./tools/flash_our_firmware.sh2. Pair with RetroPie
In RetroPie Bluetooth settings:
- Register and connect new Bluetooth device
- Select
ESP32-C3 Arcade
3. Configure in EmulationStation
In RetroPie/EmulationStation:
- Hold any button to start controller setup.
- Map joystick directions and action buttons.
- Map Start / Select / Hotkey.
- Skip unused controls by holding a button.
Verify on Pi (optional)
Install joystick tools to inspect Linux input events:
sudo apt install joystickTest:
jstest /dev/input/js0Raspberry Pi OS and RetroPie setup
Recommended OS: Raspberry Pi OS Lite (32-bit)
RetroPie runs its own EmulationStation frontend and does not need a desktop environment. Lite keeps the install lean and leaves more RAM and CPU for emulation.
1. Flash the SD card
Use Raspberry Pi Imager on your Mac:
- Choose Raspberry Pi OS (other) → Raspberry Pi OS Lite (32-bit)
- Open the settings panel (gear icon) and configure:
- Hostname (e.g.
retropie) - Username and password
- Wi-Fi SSID and password
- Enable SSH
- Hostname (e.g.
- Flash to your SD card
SSH is disabled by default on Raspberry Pi OS. Enabling it in Imager before flashing means you can connect headlessly from the first boot.
2. Install RetroPie
SSH in, then run:
sudo locale-gen en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install -y git
git clone --depth=1 https://github.com/RetroPie/RetroPie-Setup.git
cd RetroPie-Setup
sudo ./retropie_setup.shChoose Basic Install from the menu. Takes 30–60 minutes on a Pi 3 or 4.
USB serial bridge — install and run from GitHub
On the Raspberry Pi, clone the repo, install the dependencies, and run the bridge script:
git clone https://github.com/mybesttools/esp32-c3-arcade.git
cd esp32-c3-arcade
sudo apt-get update
sudo apt install -y python3-serial python3-evdev
sudo python3 firmware/esp32-c3-usb-gamepad/tools/pi_usb_serial_to_uinput.py --port autoTo target a specific port instead:
sudo python3 firmware/esp32-c3-usb-gamepad/tools/pi_usb_serial_to_uinput.py --port /dev/ttyACM0The script requires sudo to create a uinput virtual gamepad device.
Install as a systemd service
This runs the bridge automatically on boot. Assumes the repo was cloned to /home/admin/esp32-c3-arcade.
Create the service file:
sudo tee /etc/systemd/system/esp32-gamepad-bridge.service > /dev/null << 'EOF'
[Unit]
Description=ESP32-C3 USB serial gamepad bridge
After=local-fs.target
[Service]
ExecStart=/usr/bin/python3 /home/admin/esp32-c3-arcade/firmware/esp32-c3-usb-gamepad/tools/pi_usb_serial_to_uinput.py --port auto
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
EOFEnable and start it:
sudo systemctl daemon-reload
sudo systemctl enable esp32-gamepad-bridge
sudo systemctl start esp32-gamepad-bridgeCheck status:
sudo systemctl status esp32-gamepad-bridgeIf you cloned the repo to a different path, update
ExecStartaccordingly.
Tuning
Edit include/pinmap.h and adjust:
JOY_CENTER_X,JOY_CENTER_YJOY_DEADZONEJOY_MIN,JOY_MAXBUTTON_PINS[]order if you want a different button layout
Environments
| Environment | Config | Description |
|---|---|---|
esp32c3_esp32c3_ble | B | BLE gamepad, single joystick, direct GPIO buttons (default) |
esp32c3_ble_mcp | A | BLE gamepad, dual joystick, MCP23017 expander buttons |
esp32c3_esp32c3_usbserial | B | USB CDC serial bridge for Pi-side uinput script, single joystick |
esp32c3_rp2040_usbhid | — | Wired USB HID gamepad on Raspberry Pi Pico |
Parts
34| Qty | Value | Footprint | References |
|---|---|---|---|
| 5 | 100nF | Capacitor_SMD:C_0402_1005Metric | C1, C2, C3, C4, C5 |
| 4 | M3 | MountingHole:MountingHole_3.2mm_M3 | H1, H2, H3, H4 |
| 1 | COIN | Connector_JST:JST_SH_SM02B-SRSS-TB_1x02-1MP_P1.00mm_Horizontal | J24 |
| 1 | DL_DWN | Connector_JST:JST_SH_SM02B-SRSS-TB_1x02-1MP_P1.00mm_Horizontal | J12 |
| 1 | DL_LFT | Connector_JST:JST_SH_SM02B-SRSS-TB_1x02-1MP_P1.00mm_Horizontal | J10 |
| 1 | DL_RGT | Connector_JST:JST_SH_SM02B-SRSS-TB_1x02-1MP_P1.00mm_Horizontal | J11 |
| 1 | DL_UP | Connector_JST:JST_SH_SM02B-SRSS-TB_1x02-1MP_P1.00mm_Horizontal | J9 |
| 1 | DR_DWN | Connector_JST:JST_SH_SM02B-SRSS-TB_1x02-1MP_P1.00mm_Horizontal | J16 |
| 1 | DR_LFT | Connector_JST:JST_SH_SM02B-SRSS-TB_1x02-1MP_P1.00mm_Horizontal | J14 |
| 1 | DR_RGT | Connector_JST:JST_SH_SM02B-SRSS-TB_1x02-1MP_P1.00mm_Horizontal | J15 |
| 1 | DR_UP | Connector_JST:JST_SH_SM02B-SRSS-TB_1x02-1MP_P1.00mm_Horizontal | J13 |
| 1 | ESP32-C3 bot | Connector_PinSocket_2.54mm:PinSocket_1x08_P2.54mm_Vertical | U1B |
| 1 | ESP32-C3 top | Connector_PinSocket_2.54mm:PinSocket_1x08_P2.54mm_Vertical | U1A |
| 1 | HOTKEY | Connector_JST:JST_SH_SM02B-SRSS-TB_1x02-1MP_P1.00mm_Horizontal | J23 |
| 1 | I2C | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | J7 |
| 1 | LX | Connector_JST:JST_SH_SM03B-SRSS-TB_1x03-1MP_P1.00mm_Horizontal | J1 |
| 1 | LY | Connector_JST:JST_SH_SM03B-SRSS-TB_1x03-1MP_P1.00mm_Horizontal | J2 |
| 1 | PWR | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J8 |
| 1 | RX | Connector_JST:JST_SH_SM03B-SRSS-TB_1x03-1MP_P1.00mm_Horizontal | J3 |
| 1 | RY | Connector_JST:JST_SH_SM03B-SRSS-TB_1x03-1MP_P1.00mm_Horizontal | J4 |
| 1 | SEL | Connector_JST:JST_SH_SM02B-SRSS-TB_1x02-1MP_P1.00mm_Horizontal | J22 |
| 1 | SHL1 | Connector_JST:JST_SH_SM02B-SRSS-TB_1x02-1MP_P1.00mm_Horizontal | J17 |
| 1 | SHL2 | Connector_JST:JST_SH_SM02B-SRSS-TB_1x02-1MP_P1.00mm_Horizontal | J18 |
| 1 | SHR1 | Connector_JST:JST_SH_SM02B-SRSS-TB_1x02-1MP_P1.00mm_Horizontal | J19 |
| 1 | SHR2 | Connector_JST:JST_SH_SM02B-SRSS-TB_1x02-1MP_P1.00mm_Horizontal | J20 |
| 1 | SOIC-28W_7.5x17.9mm_P1.27mm | Package_SO:SOIC-28W_7.5x17.9mm_P1.27mm | MCP23017-E/SO |
| 1 | START | Connector_JST:JST_SH_SM02B-SRSS-TB_1x02-1MP_P1.00mm_Horizontal | J21 |
Similar boards
- 2 layers142.5 × 106.4 mm

- 2 layers26 × 30 mm

Microcontroller
FrameworkComputer/ExpansionCards
Reference designs and documentation to create Expansion Cards for the Framework Laptop
34 parts1.1kCC-BY-4.0 - 2 layers171.2 × 72.9 mm

Amiga gfxcard old
mntmn/amiga2000-gfxcard
MNT VA2000, an Open Source Amiga 2/3/4000 Graphics Card (Zorro II/III), written in Verilog
34 parts1k - 2 layers53.5 × 62.5 mm

Led matrix
hackclub/OnBoard
💡 Join 1,000 teenagers and make your first PCB with a $100 grant!
34 parts915 - 2 layers45 × 26 mm

- 2 layers41.7 × 25.7 mm

Headphones flex pcb rigid
strangeparts/niubi-headphones
Flexible circuit board design for adding a headphone jack to an iPhone 7
34 parts493MIT - 2 layers18.8 × 16.3 mm

- 2 layers127 × 69.9 mm

Ezcgi
baldengineer/bit-preserve
Project for capturing vintage, classic, aka old computer schematics in KiCad.
34 parts446
Questions
How big is the Cyberbrick breakout PCB?
It measures 73 × 41 mm and has 2 copper layers, 1.6 mm thick.
What parts does the Cyberbrick breakout use?
34 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
Where can I download the Cyberbrick breakout KiCad files?
From the mybesttools/esp32-c3-arcade repository on GitHub, at the commit this page was made from: the board is hardware/cyberbrick-breakout/kicad/cyberbrick-breakout.kicad_pcb and its schematic hardware/cyberbrick-breakout/kicad/cyberbrick-breakout.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the Cyberbrick breakout design in my own project?
Its repository states no licence, so its author keeps all rights: ask mybesttools before reusing the design.