5.2 KiB
description
| description |
|---|
| Diagnostic guide for common Badge 2350 development issues |
Troubleshoot Badge Issues
Help diagnose and fix common Badger 2350 development problems.
Common Issues
Badge Not Detected
Symptoms: mpremote can't find badge, no /dev/tty.usbmodem* device
Diagnostics:
# macOS/Linux: Check for USB serial devices
ls /dev/tty.usbmodem* /dev/ttyACM*
# Windows: Check COM ports
[System.IO.Ports.SerialPort]::getportnames()
Solutions:
- Check USB cable: Must be data cable, not charge-only
- Try different USB port: Some ports may not support data
- Press RESET button: Reconnect badge to computer
- Check drivers (Windows): May need CH340/CP2102 drivers
- Linux permissions: Add user to
dialoutgroup:sudo usermod -a -G dialout $USER # Log out and log back in
App Not Appearing in MonaOS Menu
Symptoms: Deployed app doesn't show up in badge menu
Diagnostics:
- Check app was deployed via Mass Storage Mode (not mpremote)
- Verify file structure:
/Volumes/BADGER/apps/my_app/ ├── __init__.py └── icon.png - Check you have 7+ apps (menu shows max 6 by default)
Solutions:
-
Redeploy using Mass Storage Mode:
- Press RESET twice
- Copy entire app folder to
/Volumes/BADGER/apps/ - Eject drive, press RESET once
-
Verify required files:
__init__.pymust existicon.pngmust be 24x24 pixels- Folder must be in
apps/directory
-
Install paginated menu if you have 7+ apps:
- Enter Mass Storage Mode
- Download: https://raw.githubusercontent.com/badger/home/refs/heads/main/badge/apps/menu/init.py
- Replace
/Volumes/BADGER/apps/menu/__init__.py
Memory Errors
Symptoms: MemoryError, app crashes, out of memory
Diagnostics:
# Check available memory in REPL
mpremote exec "import gc; gc.collect(); print('Free:', gc.mem_free())"
Solutions:
-
Collect garbage frequently:
import gc gc.collect() # Call in your update() function periodically -
Load resources once in
init(), not inupdate() -
Delete unused variables:
del large_variable gc.collect() -
Use smaller images: Reduce sprite sizes, compress PNGs
-
Avoid large lists/dictionaries: Keep data structures minimal
Module Import Errors
Symptoms: ImportError: no module named 'badgeware'
Diagnostics:
# Test badgeware import
mpremote exec "import badgeware; print('OK')"
Solutions:
- Verify badge firmware: May need MonaOS firmware update
- Check badge is genuine Universe 2025 Badge (not standard Tufty 2040)
- Flash latest firmware:
- Download
.uf2from https://github.com/badger/home/releases - Hold HOME button, press RESET, release HOME
- Badge appears as RP2350 drive
- Drag
.uf2file to drive
- Download
Display Not Updating
Symptoms: Screen frozen, changes don't appear
Diagnostics:
- Check
update()function is being called - Verify no infinite loops in code
- Check for exceptions that halt execution
Solutions:
-
Ensure
update()function exists:def update(): # Your code here pass -
Avoid blocking operations:
- Don't use
while True:loops - Don't use
time.sleep()in update loop - Keep update() fast (< 33ms for 30fps)
- Don't use
-
Check for errors in REPL:
mpremote # Watch for error messages
Button Not Responding
Symptoms: Button presses don't trigger actions
Diagnostics:
# Test button in REPL
mpremote exec "
from badgeware import io
while True:
io.poll()
if io.BUTTON_A in io.pressed:
print('A pressed')
break
"
Solutions:
-
Use correct button state check:
if io.BUTTON_A in io.pressed: # Just pressed (correct) if io.BUTTON_A == io.pressed: # WRONG! -
Call io.poll() if needed (MonaOS usually handles this)
-
Check button isn't physically stuck
Network Connection Failures
Symptoms: WiFi won't connect, timeout errors
Diagnostics:
import network
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
print('Networks:', wlan.scan())
Solutions:
- Check WiFi credentials are correct
- Verify network is 2.4GHz (badge doesn't support 5GHz)
- Check WiFi is enabled on badge
- Increase timeout when connecting:
import time wlan.connect('SSID', 'password') timeout = 10 while not wlan.isconnected() and timeout > 0: time.sleep(1) timeout -= 1
Get More Help
Use Skills for Detailed Guides
- badger-diagnostics: Comprehensive system diagnostics
- badger-2350-dev: Development toolchain reference
- badger-deploy: Deployment troubleshooting
- badger-hardware: GPIO and hardware issues
Check Official Resources
- Official docs: https://badger.github.io/
- GitHub source: https://github.com/badger/home
- API reference: https://github.com/badger/home/blob/main/badgerware/
Run Environment Check
/badge-quickstart
This will verify your entire development environment and identify configuration issues.