PicoVector Fonts/Text for Micropython 1.20.6 Update (Tufty 2040)

The results are in – NOPE…

Vector Fonts/Text failed to work. Still getting the grey/black screen. I nuked my device, and install 120.5. As well ONLY uploaded the font file to the device. Ran the script (a copy and past, from @alphanumeric’s above posting, the one taken from my earlier example).

So very very confused…

I created a Fonts folder on my Tufty / Pico, and copied just the font I used to that folder.
I also saved and ran my file from the Tufty
@Mad_Monk, Really stumped as to why it doesn’t work for you?

@hel Are there different hardware revisions of the Tufty?
I only ask because I have a couple of “for testing” “pre production” Pimoroni products here at home. My Tufty isn’t in that category though.

I was wondering that as well – Is there a way to tell? (hw revisions)

My original Tufty was replace, thank you Pimoroni!!, when the usb-c connector fell/disconnected from the motherboard. So maybe??

Ops, I made a big typo above, I’m running 120.6, not 120.5, sorry if that confused things?
With Thonny set to Micro Python (RP2040) I get.
Thats all software info I’m thinking?

MicroPython 856e08b1931b88271816a2f60648f6ff332235b2, tufty2040 v1.20.6 on 2023-09-18; Pimoroni Tufty 2040 with RP2040

Type “help()” for more information.

@alphanumeric
It is all good. Whether it is 120.5 or 120.6, Vector Text/fonts fails to a frozen grey/black screen.

Yeah, I believe it is software info, but here is what I have:
MicroPython 856e08b1931b88271816a2f60648f6ff332235b2, tufty2040 v1.20.6 on 2023-09-18; Pimoroni Tufty 2040 with RP2040

I’ve Googled this (hardware revision) to death and come up empty.
I will admit to being slightly distracted, though.
I’m doing some chemistry on the side.
I’m converting rum & coke to urine. =) ;)

1 Like

Good Afternoon Hel!!

Is there a way to tell the hardware revision level? – as I am unable to generate any Vector Text after flashing (w/ nuke) and reapplying 120.5 or 120.6. Even if there is just the font and py script written to the device.

Interesting enough, not sure if it applies, might be incorrect coding for the 120.5/6 levels, but the River Raid game (https://github.com/maurelioredfox/pimoroni-pico/blob/projects/micropython/examples/tufty2040/river_raid.py) displays the sprites as multi-coloured boxes. Nothing like they should be.

It is truly bizarre. I can display Vector graphics (i.e. @gadgetoid’s clock, your hallow circle, etc.), but add words, bam black screen.

River raid worked OK for me, JFYI post.
I saw ships and helicopters as opponents to be avoided by my green plane.

I can’t recall that we’ve made any significant Tufty hardware revisions 🤔

River Raid is also working fine for me. Seems like all the examples that your Tufty is having trouble with involve loading files so I wonder if something might be awry with the flash memory - can it display a JPG without falling over?

I just ran a few commands from Shell. I’ll be honest and say I don’t know exactly what this means? But might help? I did a stop before running what’s posted. Hel likely knows what’s what. And might even have some better commands to run.

>>> import os
>>> os.statvfs('//')
(4096, 4096, 1792, 1769, 1769, 0, 0, 0, 0, 255)
>>> import gc
>>> gc.mem_free()
96656
>>> gc.mem_alloc()
136112
>>> 
>>> import micropython
>>> micropython.mem_info()
stack: 516 out of 7936
GC: total: 221376, used: 158784, free: 62592
 No. of 1-blocks: 2130, 2-blocks: 179, max blk sz: 4800, max free sz: 2117
>>> 

The Tufty I’m running my code on was purchased on August 1st 2023.
I have an older one but it was dropped and the screen got cracked / broken. =(
Which was why I bought a replacement. My Tufty is one of my most prized Pimoroni products. I just love that nice big color LCD screen. They may tell you otherwise, but in this case, bigger is better. : P

I can’t recall that we’ve made any significant Tufty hardware revisions 🤔

River Raid is also working fine for me. Seems like all the examples that your Tufty is having trouble with involve loading files so I wonder if something might be awry with the flash memory - can it display a JPG without falling over?

Just tested… Wow!! I can no longer load/display JPGs. All my previously created scripts (even went back to 120.4 [as I know there were totally working then]) fail to work.

Indeed, a very sad day.

That sucks big time, but that says its hardware, not software. =(
It’s something I think of in the back of my mind when I flash_nuke an RP2040.
So far so good, though. I haven’t had an issue like this.

I’m a retired electronic technician, trust me, stuff like this happens even on the big buck stuff.

Okay… created a random text file, about 6.99 MBs,to “fill the space” on the Tufty Wanted to see if I had any write, and then read errors when opening it. None that I could determine.

What came of it… well… I can now open JPGs… so all my previously created work is fine. Vector Text, and as we are on the subject River Raid, still evades me.

Interestingly enough the ‘Amazing Game’ that comes with Tufty 2040 works just fine. Sprites load. Looks spot on. However, River Raid, all I see is multi-colour boxes. And any attempt in writing Vector Text becomes a black screen.

I literally copied and pasted the following script: (no joy found)

#IMPORT LIBRARIES
from picographics import PicoGraphics, DISPLAY_TUFTY_2040
from picovector import PicoVector, ANTIALIAS_NONE, ANTIALIAS_X4, ANTIALIAS_X16

#SET DISPLAY
display = PicoGraphics(display=DISPLAY_TUFTY_2040)

#SET VECTOR, ANTIALIASING & FONT TYPE {download.af fonts from resources above. Upload through Thonny in root "/" }
vector = PicoVector(display)
vector.set_antialiasing(ANTIALIAS_X4)
result = vector.set_font("Roboto-Black.af", 50)  #vector.setfont("font-name-directory",font-size-int)

#SET PALETTE
WHITE = display.create_pen(255,255,255)
BLACK = display.create_pen(0,0,0)

while True:

    #BLACK BG
    display.set_pen(BLACK)
    display.clear()
        
    #SET PEN AND DISPLAY TEXT - vector.text("TextHere",X,Y,ANGLEDEG)
    display.set_pen(WHITE)
    vector.text("Hello World!", 60, 90, 0)

    #UPDATE SCREEN
    display.update()

That line to me, even though it works for me, doesn’t seem right?
@hel Shouldn’t it be NONE or X4 or X16

Try this version of flash_nuke.uf2? It’s compiled for a board with 8MB of flash. The usual one is compiled for a Pico which only has 2MB of flash, so it could be that it’s not clearing out all the memory properly (though it’s not something we’ve run into before)…

8mb_flash_nuke.zip (6.9 KB)

No, that’s correct (though you only need to import the ones you’re using, of course).

1 Like

Sadly, nope - no go. Flashed it w/ the 8mb nuke. Reinstalled 120.6. Same issue, black screen when trying Vector Fonts/Text

Here is the versioning I am running:

Tried loading only specific ANTIALIAS_(None, X4, X16):

Even changed the font, just in case, you never know, that didn’t help either.

And also, sadly, River Raid is still multi-coloured blocks instead of a lovely plane, ship and helo…

Alas!

Drop us an email at support@pimoroni.com with a link to this thread and we’ll get a replacement sorted for you :)

1 Like