I’m finding this very difficult, slow and more than a bit frustrating. I would really like a basic, normal MicroPython .uf2 to use as an alternative on this super hardware. I hate not being able to do a screen.update() when I want to. I can fly a PRESTO but I feel like a total idiot on this TUFTY2350.
I just cannot see why this code just skips over title screen and goes straight to the middle/ main section but does the exit section. It worked before I added the exit screen part.
# Tony Goodhew - A simple TUFTY2350 app - 2 January 2026
import machine
# Load some fonts
nope_font = rom_font.nope
compass_font = rom_font.compass
sins_font = rom_font.sins
ignore_font = rom_font.ignore
bacteria_font = rom_font.bacteria
count = 50
title_screen = True # Flag for title screen
exit_screen = False # Flag for exit screen
start_time = io.ticks
def update(): # This is the main loop
global title_screen
global exit_screen
global count
global start_time
# Title screen - used for the first 2 seconds
if title_screen:
screen.pen = color.black
screen.clear()
screen.pen = color.red
screen.font = bacteria_font
screen.text("Testing",30,60)
if io.ticks - start_time >= 2000:
title_screen = False
# Exit screen - used for last 2 second after Button_B pressed
if exit_screen:
screen.pen = color.black
screen.clear()
screen.pen = color.blue
screen.font = bacteria_font
screen.text("Good Bye",30,60)
if io.ticks - start_time >= 2000:
exit_screen = False
machine.reset()
# The main loop - used after the first 2 seconds
else:
screen.pen = color.blue
screen.clear()
screen.pen = color.yellow
screen.font = nope_font
screen.text("MAIN LOOP", 5, 5)
screen.font = ignore_font
screen.text(str(count), 70,50)
screen.pen = color.white
screen.font = sins_font
screen.text(str(count), 140,5)
# Draw bar graph
screen.pen = color.green
rectangle = shape.rectangle(25, 90, count, 20)
screen.shape(rectangle)
# Check U and D buttons
if io.BUTTON_UP in io.pressed:
count = count + 10
if count > 100:
count = 100
if io.BUTTON_DOWN in io.pressed:
count = count - 10
if count < 0:
count = 0
if io.BUTTON_B in io.pressed:
start_time = io.ticks
exit_screen = True
I gave up with CircuitPython because it refused to support simple graphics but went ‘all layers and sprites’. I enjoy using PicoGraphics and can do quite complicated things like clocks.
I’m sure the majority of customers would appreciate a ‘normal’ .uf2 - perhaps add access to these rather nice and simple to use fonts.
