Development environment setup and workflow for Universe 2025 (Tufty) Badge with MonaOS. Use when setting up the badge, flashing firmware, debugging, or working with the development toolchain.
Flashes MicroPython firmware and deploys MonaOS apps to the Universe 2025 Badge via USB Mass Storage Mode. Use when setting up the RP2350 development environment, copying apps to `/system/apps/`, or debugging with the badgeware API.
/plugin marketplace add johnlindquist/badger-2350-plugin/plugin install badger-2350-dev@badger-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Help develop, flash, and debug applications for the Universe 2025 (Tufty) Badge and its MonaOS launcher system.
The Universe 2025 Badge uses:
/system/apps/ directory__init__.py, icon.png, and optional assets/update() function called every frameWhen developing MonaOS apps:
badgeware module API__init__.py and icon.png/system/apps/my_app/ directoryFor MicroPython development:
# Install Thonny IDE (recommended for beginners)
brew install --cask thonny
# Or install command-line tools
pip install esptool adafruit-ampy mpremote
For C++ development:
# Install Pico SDK
git clone https://github.com/raspberrypi/pico-sdk.git
export PICO_SDK_PATH=/path/to/pico-sdk
# List connected devices
ls /dev/tty.usb*
# Connect via serial (MicroPython REPL)
screen /dev/tty.usbmodem* 115200
# Exit screen: Ctrl+A then K
# Put badge in bootloader mode (hold BOOT button, press RESET)
# Flash MicroPython firmware
esptool.py --port /dev/tty.usbmodem* write_flash 0x0 firmware.uf2
mpremote connect /dev/tty.usbmodem* run my_app/__init__.py
⚠️ CRITICAL: /system/apps/ is READ-ONLY via mpremote. You MUST use USB Mass Storage Mode to install apps.
# Step 1: Enter Mass Storage Mode
# - Press RESET button TWICE quickly (double-click)
# - Badge appears as "BADGER" drive
# Step 2: Copy app to badge
# macOS/Linux:
cp -r my_app /Volumes/BADGER/apps/
# Windows:
xcopy my_app D:\apps\my_app\ /E /I
# Step 3: Exit Mass Storage Mode
# - Eject BADGER drive safely
diskutil eject /Volumes/BADGER # macOS
# - Press RESET once to reboot
# Your app now appears in MonaOS launcher!
File System Mapping:
/Volumes/BADGER/apps/ → /system/apps/ on badge/Volumes/BADGER/assets/ → /system/assets/ on badgempremote connect /dev/tty.usbmodem* ls /system/apps
⚠️ Note: Install the paginated menu for unlimited apps (default shows 6):
/Volumes/BADGER/apps/menu/__init__.py in Mass Storage Modempremote connect /dev/tty.usbmodem* ls /storage
mpremote connect /dev/tty.usbmodem* cp :/system/apps/my_app/__init__.py local_backup.py
MonaOS app structure on your computer:
my_app/ # MonaOS app directory
├── __init__.py # Entry point with update() function (required)
├── icon.png # 24x24 PNG icon for launcher (required)
├── assets/ # Optional: app resources (auto-added to path)
│ ├── sprites.png
│ ├── font.ppf
│ └── data.json
└── README.md # Optional: app documentation
Multiple apps in development:
badge-project/
├── my_app/ # First MonaOS app
│ ├── __init__.py
│ └── icon.png
├── game_app/ # Second MonaOS app
│ ├── __init__.py
│ ├── icon.png
│ └── assets/
│ └── sprites.png
├── requirements.txt # Python tools
└── deploy.sh # Deployment script
# In REPL
import sys
sys.print_exception(e) # Print full exception traceback
from badgeware import screen, display, brushes
# Clear with black
screen.brush = brushes.color(0, 0, 0)
screen.clear()
# White text
screen.brush = brushes.color(255, 255, 255)
screen.text("Hello Badge!", 10, 10, 2)
display.update()
import network
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
wlan.connect('SSID', 'password')
print(wlan.isconnected())
print(wlan.ifconfig()) # IP address info
import machine
import badgeware
# Check battery level
battery = badgeware.get_battery_level()
print(f"Battery: {battery}%")
# Check if USB connected
usb = badgeware.get_usb_connected()
print(f"USB: {usb}")
# Light sleep (for delays)
machine.lightsleep(1000) # Sleep 1 second
# Deep sleep (wake on button press - saves significant power)
machine.deepsleep()
update() function called every frameupdate() - it runs continuouslyio.ticks for animations instead of time.time()update() to reduce GC pausestry/except blocks to prevent crashesBadge not detected: Check USB cable, try different port, press RESET button
Out of memory: Reduce allocations in update(), use generators, call gc.collect(), free variables with del
Display not updating: MonaOS automatically updates after update() returns - no manual update needed
App not in menu: Check uploaded to /system/apps/my_app/, verify icon.png exists, may need pagination: https://badger.github.io/hack/menu-pagination/
WiFi connection fails: Check credentials, verify 2.4GHz band, restart badge
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.