A macropad and RP2040 microcontroller development board that allows you to control GPIOs with keyboard keys combined on a single PCB, with a custom BASIC interpreter.
Documentation: https://nicholaslim.me/macro-microcontroller-2
View hardware demonstration at https://nicholaslim.me/macro-microcontroller-2/assets/hardware-demo.mp4!
- Microcontroller unit directly soldered on board!
- More output devices with speed and volume adjustments (Buzzer and motor).
- More ways to power the board (Barrel jack, USB, GPIO pins).
Macro Microcontroller 2 allows you to control GPIO pins using macropad-like keys and from the serial terminal using the built-in Macro Microcontroller BASIC Interpreter. It offers more ways to control GPIOs by having builtin keys that can be programmed to your own needs.
A basic BIOS-like firmware, which performs basic POST routines and reports information on the device. Source code.
_ _
| \/ | Macro Microcontroller BIOS Version 0.0.1.
|_\/_| Copyright (C) 2025-2026 Nicholas Lim.
Device: Macro Microcontroller 2 (RP2040 @ 125MHz)
Serial Number: E465B8F41B502E30
RAM Free: 254K OK
Serial Status: Connected
Press SW1 to enter Macro Microcontroller BASIC.
Press SW2 to enter BOOTSEL mode.
Booting system...
A simple DOS-like environment that boots from the BIOS. Source code.
Available commands:
HELP: Launches the help guide.ECHO: Echoes text.LS: Show directory listing.SYSTEM: Starts another Macro Microcontroller DOS console.EXIT: Stops all processes for power off.
A BASIC interpreter written in C for Macro Microcontroller, providing a simple coding environment via a serial terminal. You may view a demo at Assets/firmware-demo.mp4. Currently available statements:
PRINT: Outputs text to the serial terminal.LET: Assigns a value (integer, float or string) to a variable (Only one variable is allowed for now).INPUT: Assigns a value (integer, float or string) to a variable via user input.GPIO: Turns on a specified GPIO pin for 1 second.LSVAR: Outputs variable name and their value to the serial terminal.END: Clears variable and reset line numbers.EXIT: Puts the device into sleep/power off mode.KEY: Pass GPIO controls to the macropad.REM: Add comments to your program.
For example programs, see Firmware Files/example.bas.
View PCB file at https://kicanvas.org/?repo=https%3A%2F%2Fgithub.com%2FNicholas1023%2Fmacro-microcontroller-2%2Fblob%2Fmain%2FPCB%20Files%2Fmacro-microcontroller-2.kicad_pcb!
main
├── /docs ← Documentation website and datasheet files are here
├── /Assets ← Images and videos are here
│ └── /Journal ← Images for JOURNAL.md
├── /PCB Files ← .kicad_ files are here
├── /Production Files ← Gerber and BOM files are here
├── /Printing Files ← STLs are here
├── /Firmware Files ← Firmware files are here
├── JOURNAL.md ← Devlogs
├── README.md ← This file
├── LICENSE.txt ← License
└── schematics.pdf ← Schematics
| Component | Ref Designator | Qty | Footprint |
|---|---|---|---|
| HMB1206-03 | BZ1 | 1 | Buzzer_12x9.5RM7.6 |
| Capacitor 0.1uF | C1, C2, C3, C4, C5, C6, C7, C10, C11 | 9 | 0402 |
| Capacitor 8pF | C8, C9 | 2 | 0402 |
| THT LED | D1, D2, D3 | 3 | LED_D5.0mm |
| SMD LED | D4 | 1 | 0603 |
| USB-B Micro Port | J1 | 1 | USB_Micro-B_Molex_47346-0001 |
| Barrel Jack | J3 | 1 | BarrelJack_Horizontal |
| 2.54 1x05 Pin | J4 | 1 | PinHeader_1x05_P2.54mm_Vertical |
| 2.54 1x02 Pin | M1 | 1 | PinHeader_1x02_P2.54mm_Vertical |
| Resistor 27ohm | R1, R6 | 2 | 0402 |
| Resistor 220ohm | R2, R4, R5, R7 | 4 | 0402 |
| Resistor 5kohm | R3, R8, R9 | 3 | 0402 |
| Potentiometer | RV1, RV2 | 2 | Potentiometer_Vishay_T73YP_Vertical |
| Cherry MX Keys | SW1, SW2, SW3 | 3 | SW_Cherry_MX_1.00u_PCB |
| Reset & Boot Button | SW4, SW6 | 2 | SW_Push_SPST_NO_Alps_SKRK |
| DIP Switch | SW5 | 1 | SW_DIP_SPSTx02_Slide_9.78x7.26mm_W7.62mm_P2.54mm |
| RP2040 | U1 | 1 | QFN-56-1EP_7x7mm_P0.4mm_EP3.2x3.2mm |
| TLV71311PDBVR | U2 | 1 | SOT-23-5 |
| XC6206P332MR | U3 | 1 | SOT-23-3 |
| W25Q128JVP | U4 | 1 | WSON-8-1EP_6x5mm_P1.27mm_EP3.4x4.3mm |
| TPS76350 | U6 | 1 | SOT-23-5 |
| NX3225SA-12MHz | Y1 | 1 | Crystal_SMD_3225-4Pin_3.2x2.5mm |
Hardware files ("PCB Files", "Printing Files", "Production Files", "schematics.pdf") are licensed under the terms of the CERN-OHL-P-2.0 License. See LICENSE.txt.
Documentation files ("docs", "Assets", "JOURNAL.md") are licensed under the terms of the MIT License. See docs/LICENSE.txt.
For firmware files ("Firmware Files"), please refer to the respective file headers for licensing and copyright information.
Macro Microcontroller BIOS, Macro Microcontroller DOS and Macro Microcontroller BASIC compiles source code from the Pico SDK. See Firmware Files/pico_sdk_import.cmake for the Pico SDK license and copyright notice.

