Skip to content

Latest commit

 

History

History
95 lines (65 loc) · 3.26 KB

File metadata and controls

95 lines (65 loc) · 3.26 KB

Welcome to Badgeware! ❤️

Badgeware is a MicroPython-powered platform for our family of programmable badges — Tufty, Badger, and Blinky (aka Badgeware). Write a short Python script, copy it to your badge over USB, and it runs. No toolchains, no compilers, no fuss.

Each badge runs the same API, so code you write for one model will mostly work on the others. The main differences are screen resolution and colours — see Coding for the different badges for the details.


A taste of Badgeware

Every app is built around a single update() function that the badge calls once per frame. Here's the smallest complete app:

def update():
    # screen.pen = color.navy
    # screen.clear()

    # screen.pen = color.white
    # screen.font = rom_font.smart
    screen.text("Hello, world!", 10, 50)

run(update)

Want to make it interactive? Add button input:

messages = ["Hello, world!", "Badgeware rocks!", "Press a button!"]
current = 0

def update():
    global current

    if badge.pressed(BUTTON_UP):
        current = (current + 1) % len(messages)

    text = messages[current]
    width, _ = screen.measure_text(text)
    x = (screen.width / 2) - (width / 2)

    screen.text(text, x, 50)

run(update)

Press Up to cycle through the messages. That's pretty much it — everything else is just building on these ideas.


Start here

New to Badgeware? Work through these in order.


API reference

The full reference for every module. Useful when you know what you want but need the exact method signature.


What's new

28th February 2026 — Firmware update available. See Updating your firmware for instructions.