An RP2040 microcontroller development board with an integrated macropad that lets you control GPIOs with keyboard keys on a single PCB, plus a custom BASIC interpreter and disk operating system.
Documentation page: https://nicholaslim.me/macro-microcontroller-2
Hack Club Stardance Challenge project: https://stardance.hackclub.com/projects/21502
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).
- Custom BASIC interpreter and a disk operating system.
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 or a disk operating system for simple uses. It offers more ways to control GPIOs by having builtin keys that can be programmed to your own needs.
For more details on the hardware, please read the datasheet!
A basic BIOS-like firmware, which performs basic POST routines and reports information on the device. Source code.
_ _
| \/ | Macro Microcontroller BIOS Version 0.0.2.
|_\/_| Copyright (C) 2025-2026 Nicholas Lim.
Device: Macro Microcontroller 2 (RP2040 @ 125MHz)
Serial Number: ****************
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 (* denotes optional parameters):
HELP: Launches the help guide.CALCULATE: Performs basic operations on 2 numbers. Usage:CALCULATE [Number] [+ - * / ^ root] [Number]ECHO: Echoes text.LS: Show program listing.SYSTEM: Starts another Macro Microcontroller DOS console.EXIT: Stops all processes for power off.GPIO: Turns on a specified GPIO for 1 second. Usage:GPIO [LED# IO# BELL MOTOR]VERSION: Shows the release version.REBOOT: Reboots the system. Usage:REBOOT -m [BASIC BOOTSEL]*INFO: Displays device and memory information.UPTIME: Shows device uptime.
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. Try out the web editor at https://editor.nicholaslim.me/macro-microcontroller!
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-W-2.0 License from 9 September 2026 onwards. Versions prior to this date remain available 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.
macro-microcontroller-basic.c, macro-microcontroller-bios.c, macro-microcontroller-bios+dos.c are licensed under the terms of the MIT License. firmware-template.c is licensed under the terms of the MIT-0 License. example.bas is marked CC0 1.0.
Macro Microcontroller BIOS, Macro Microcontroller DOS and Macro Microcontroller BASIC compile source code from the following third-party software:
- Pico SDK: See Firmware Files/pico_sdk_import.cmake for the Pico SDK license and copyright notice.

