Thanks. I’ve been at this too long today.
Please try to understand my point. It is not about fixing simple programming errors. The core problem is that you are into state-machine territory. You have to know about states, state-transitions and manage both of them. And this make the whole program so much more complicated than needed in many cases.
Managing states with if-elif-else is possible, but cumbersome. And already for small use cases as we see here it is error-prone.
It is still absolutely possible to roll your own. You can just start with an empty main.py, import display from badgeware, and set up your own loop. display.update() is still available.
For example, this will function perfectly well as main.py:
from badgeware import display
mode(HIRES)
while True:
io.poll() # MUST be called for io.ticks, io.pressed etc to work
screen.pen = color.black
screen.clear() # Not strictly necessary but a clean buffer is a healthy buffer
screen.pen = color.white
screen.font = rom_font.compass
w, h = screen.measure_text("Hello World")
screen.text("Hello World", (screen.width - w) // 2, (screen.height - h) // 2)
display.update(screen.width == 320) # Accepts True for hires / False for lores so `screen.width == 320` works
The drawing API is still available here, as are all of the other functions of the badge. The idea isn’t to create a walled garden here, or reinvent how to do things - instead, it’s just to provide a boilerplate setup with your init code and your while True: loop already there.
Great! That should go into the docs, right at the beginning, even before “Creating an app”. This will give users a quick start. Everything else is advanced stuff that experienced programmers will honor.
Looking forward to it. It’ll greatly shorten the feedback loop for app development.
Btw, the simulator doesn’t have to be online. And actually being able to run it locally would be better for dev experience (better integration with the local editor, git, etc..).
Finally got my hands on mine. Just sat down to tinker with it. Thonny keeps erroring when I try to save / overwrite the secrets.py file? I must not have been in boot mode? I eventually just copied it over via Windows file explorer.
The clock app now shows the following
12nd February 2026
1627
EDIT: I really like the Pixy Tube rendition of a clock. =)
Glad it finally arrived. Have fun! It took me a bit of time to get into the different work flow. Much more documentation available now - a good long read and very useful. Enjoy.
Wait, what? Read the owners manual? 8|
=)
I love a good instruction manual. Saves a load of mistakes and wasted hours. Needs a good index!
Dagnammit, just looked at the Badger next to me and it’s now showing the 13rd of February! Welp, I’ll get a fix out for that shortly I guess!
The nixie tubes was a fun one though, it was actually a whole scene set up in Blender and then different parts of it rendered out on a transparent background so that the glass would show reflections and transparency and things properly.
On my Tufty2040 I did it this way.
def describe_date(date):
date = rtc.get_date()
if date == 1:
description = "st"
elif date == 2:
description = "nd"
elif date == 3:
description = "rd"
elif date == 21:
description = "st"
elif date == 22:
description = "nd"
elif date == 23:
description = "rd"
elif date == 31:
description = "st"
else:
description = "th"
return description
I haven’t yet looked at the Tufty2350 code. I almost bricked mine. I was editing the badge app with my info. On the next boot it just showed USB Drive and wouldn’t run anything? No menu no nothing. In boot mode it showed as Tufty but there were no files of directories to be found? I had to unplug the battery and fidle with the buttons to get it to show up as RP2350 so I could reflash it. It’s all back up and running now. And my edits to the badge app worked? I’m not sure what happened?
Yeah, in the app as it stands it sets the suffix to “th” and then changes it if the day of month ends in 1, 2 or 3, and I have no idea why I did it that way…
As for your Tufty it sounds like it’s run into a bug where if something goes squiffy during reset, like for example it gets an unexpected extra reset, it wipes the FAT. We’ve already got a fix for it in the development branch. You can find it in the GitHub repo at GitHub - pimoroni/tufty2350 at dev-jan-2026 if you want to get the latest version - although be aware there are other API changes which will render some of the documentation out of date. I’ve been working on new, revised and comprehensive documentation for the new and changed functions, and it’ll be going live soon. Some tasty stuff in there though, including something to make flipping between different screens very easy @Tonygo2
I got an error message when I ejected it, and it was all down hill from there. I “think” I might have left Thonny open when I tried to eject it? I had clicked save but didn’t close Thonny. I’ll be paying more attention to what and how I’m doing things so hopefully, it doesn’t happen again.
I am really impressed with how it works etc. A really nice bit of kit. =)