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. =)
I am also finding it very difficult, slow and more than a bit frustrating. =(
I’m trying to port some code that I ran on my Tufty 2040 to my new Tufty 2350. It’s like learning a whole new language. I’ve been looking at the supplied Apps to sort out how to do what. I look over the API stuff, but if that doesn’t click I dig down into the Apps folders. I’m trying to setup my date time etc display but there is no clock info in the API’s?
What I have done is flash nuked my Tufty 2350, and flashed it with the tufty-v1.0.0-micropython.uf2 firmware-only image. And I had an issue when trying to flash_nuke it. It wouldn’t work unless I unplugged the battery. It was the only way I could wipe it clean and ditch the filesystem burden. That being said once I get my code working, I’ll reflash with filesystem and set it up as an app.
A schematic would really help. Having to take the case off and unplug the battery just to nuke it was a bit of a pain. Info on how to read the date and time would also be nice.
New documentation has actually just dropped a few minutes ago, available on the docs pages of the Badgeware site - it does include the rtc!
This is to go with the new firmware release, which also just dropped - the documentation is for that firmware which deprecates the original shipping firmware. Bear in mind if you’re flashing it to your badge you’ll need the with-filesystem version as the apps all needed changes to work with the new firmware. That firmware WILL wipe your filesystem, so make sure any of your own code you’ve put on the badge is backed up!
As regards the docs, the live examples are down at the moment while we’re getting the new firmware onto the simulator software, but they’ll be back up soon.
This is good news indeed. =)
go here for download: Release Version v2.0.0 · pimoroni/tufty2350 · GitHub
MicroPython bw-1.27.0, on 2026-02-26; Pimoroni Tufty 2350 with RP2350
Type "help()" for more information.
rtc.datetime()
MPY: soft reboot
Traceback (most recent call last):
File "<stdin>", line 320, in <module>
TypeError: 'module' object isn't callable
datetime()
Gets or sets the current date and time. This is stored as a tuple of form (year, month, day, hour, minute, second, dow).
Usage
rtc.datetime() - Returns the current date and time as a tuple.
rtc.datetime(dt) - Sets the RTC time to the provided date and time. - dt - Tuple containing the new date and time.
Returns
A tuple if no parameters passed in, otherwise None
If I do the following I don’t get an error message, but I have no idea if that’s correct? I’m slowly fixing other date time error messages as I go along. My code was based on an RV3028 that I had connected to my Tufty 2040. I know I will be very happy when I get this working, but it’s been a slow and frustrating experience so far. Don’t get me wrong, the hardware is excellent. It’s all the things I wish I had when I got my Tufty 2040. Protective case, nice easy to push buttons. But the software side is going to be a challenge for novice users. What it’s capable of doing is IMHO incredible. I just wish it wasn’t such a struggle to get there. Half (or more) of my problems are I’m average at best, Micro Python coding wise. ;)
year, month, day, dow, hour, minute, second, dow = RTC().datetime()
RTC().datetime((year, month, day, dow, hour, minute, second, dow))
Adding some prints should show you if the values you get are sensible. If the rtc hasn’t been updated yet, it won’t show the correct values, but they should be in a range that you expect (e.g. a year with four digits).