Skip to content

pimoroni/badgeware-docs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Badgeware documentation and examples.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors