Tufty2040 - No display

Hello, everyone
I have just received my Tufty 2040.
When I switched it on for the first time, the menu worked and I was able to select and test the various example programs.
After that I have followed the ‘Getting Started with Tufty 2040’ instructions step by step.

  • MicroPyhton downloaded
  • Tufty connected via USB
  • Put Tufty in booloader mode

But as soon as I opened Tufty in Thonny, the MicroPython v1.19.1 (2022-06-18) was installed.
From then on, the display no longer works. I can control the LED with

from machine import Pin

led = Pin(25, Pin.OUT)
led.value(1)

but as soon as I try to do

from picographics import PicoGraphics, DISPLAY_TUFTY_2040
display = PicoGraphics(display=DISPLAY_TUFTY_2040)

WHITE = display.create_pen(255, 255, 255)

display.set_pen(WHITE)
display.text("Hello Tufty", 0, 0, 320, 4)
display.update()

the error message comes up

ImportError: no module named 'picographics'

I tried the ‘pimoroni-tufty2040-v1.19.0-micropython.uf2’ File
Load the file onto the Tufty - but it didn’t do anything.
I also loaded flash_nuke.uf2 but it didn’t help either.

What am I doing wrong? I’m quite new to programming with Python/Pico and don’t really understand everything yet.

I am very grateful for any help.

You want the pimoroni-tufty2040-v1.19.0-micropython.uf2
It will have the files you need for the Pimoroni Micro Python examples to work.

That display uses an st7789 driver but its a custom parallel setup. That’s accounted for in the Pico Graphics.

from picographics import PicoGraphics, DISPLAY_TUFTY2040
display = PicoGraphics(DISPLAY_TUFTY_2040)

Thanks for your reply. As mentioned above, I already tried the ‘pimoroni-tufty2040-v1.19.0-micropython.uf2’ release.
When I move it to the Tufty, the window closes, but nothing more happens - the screen stays off.
When I put it back into bootloader mode, Thonny asks if I want to install v1.19.1 (2022-06-18).
If I cancel, he will no longer be recognized by Thonny.
If I click install then the Tufty is recognized but the display stays off - because of the v1.19.1 I guess. And there are no files on it either.

Yes, Thonny will offer to install the plain jane Micro Python uf2 if the device is blank.
And the flash_nuke uf2 file will make it blank if you use it.

The Pimoroni Tufty uf2 likely doesn’t have the demo’s on it. It’s a blank canvas, as they say.
If there is no main.py file on the Tufty it won’t do anything when powered up. in Thonny click file open, select Pi Pico, and see if it lists a main.py.

I only just got mine yesterday. I’ll plug it into my PC and have a look see in a bit.

This is what is on mine as is out of the box, as supplied by Pimoroni.
Capture

Having nuked the device you will have removed all the programs. You can download them from here:
pimoroni-pico/micropython/examples/tufty2040 at main · pimoroni/pimoroni-pico · GitHub
Put them in a folder 'Tufty progs" ?
In Thonny navigate to the folder with the top left files window.
Right click each file in turn and pick Upload to / for each one.
This should re-install all the necessary files to your Pico.

Have fun!

This is pretty cool, the supplied main.py file scans for py files. I added a weather.py file to mine and its automatically listed in the main menu. Did a couple of edits to set the display to TUFTY_2040 and it runs my file. Also added a BME280 via the qwicc connector.
Going to be having a lot of fun with this. =)

First of all I would like to thank you for all your replies. I really appreciate that.

What I did now:

  • I nuke the Tufty so I have an empty device
  • I load the ‘pimoroni-tufty2040-v1.19.0-micropython.uf2’ onto the tufty
  • I downloaded all the files from the repo @Tonygo2 & @alphanumeric linked
  • I put the Tufty in bootloader mode
  • In Thonny - so I can move the files - I install v1.19.1 → Tufty doesn’t appear if I don’t do it
  • Moved all downloaded files individually via Upload to / onto the Tufty
  • Disconnect the tufty again so I can upload the ‘pimoroni-tufty2040-v1.19.0-micropython.uf2’ release

When I put the Tufty back into bootloader mode to connect to the PC, Thonny asks again if I want to install v1.19.1. Is it possible that something is wrong there? Somehow I have the feeling that no firmware remains on the Tufty once I unplug it.

It only needs to be in boot mode to load a uf2 file.
Once that’s done just plug it in without holding the boot mode button.
Thonny will see it, you may have to click stop, but if should be seen by Thonny.

So, boot mode, Ignore the prompt to install 1.19, click no. Then drop “Pimoroni Tufty” uf2 onto it.

Then copy those py files to it in Thonny.
Power off, then back on (don’t touch boot button), main.py should run.

That’s the thing, after I’ve loaded the Pimoroni release onto the Tufty, the Explorer window closes. I wait 30s - 1min. unplug it and then plug it back in (without pressing boot).
And then nothing happens anymore. Neither visible in Explorer nor in Thonny. I don’t even get that far that I can upload the files if I don’t install the Thonny release beforehand.
The screen stays off all the time, only the small LED on the back sometimes flashes.

You have to press the start button (behind the Tufty name next to boot) to wake it up.
Have you tried this?

1 Like

You mean the ‘pwr’ key, right?
But yeah, I’ve tried every imaginable button combination by now. The only one that does anything is hold down the ‘boot/usr’ key and press the ‘pwr’ key, which puts the Tufty into bootloader mode.

I guess it’s time to face the truth and accept that the screen is dead. I guess I was just unlucky.
I’ll probably just get a new one.

If there is no main.py file stored on it, it won’t do anything. The screen will be blank.

Plus, with micro python, it won’t show up as removeable media.

If you want to give it one last try I can give you step by step instructions.

Plug the USB cable in.
Press and hold the Boot select button, then press and release the power button.
Then release the Boot Select button.
It should show up as RPI-RP2.

Drag and drop the Pimoroni Tufty uf2 file to it.
It will automatically reboot, and the RPI-RP2 will disappear.

In Thonny with the interpreter set to MicroPython(Raspberry Pi Pico),
it should show up as,
MicroPython v1.19 on 2022-06-17; Pimoroni Tufty 2040 with RP2040
Screen will be blank as there is no main.py file to run.

At this point I would run one of the examples that uses the screen, battery.py for example, and see what happens.

Getting Started with Tufty 2040 (pimoroni.com)

1 Like

Again, thank you for being patient with a beginner like me! @alphanumeric and @Tonygo2
So, the screen works again. Yay! What was the problem?
In Thonny, the interpreter selection was correctly set to ‘MicroPython (Raspberry Pi Pico)’, but the port was set to ‘< Try to detect port automatically >’. *facepalm

The programs

  • awesome_game.py
  • button_test.py
  • pride_badge.py
  • retro_badge.py

won’t start when I select them - the screen flickers and the Tufty then freezes. But I’ll find out why…

I at least hope this thread will help someone in the future who made the same silly mistake as me…
Thank you for the help!

Aw, OK, it’s not just me! I’ve been noticing, if I leave it set to "Try to detect port automatically’ it doesn’t detect it? If I manually set the port from the drop down list it connects? This only just started happening recently, with the newer version uf2 files.

In Thonny, if you do a File Open, Pi Pico, and select one of the ones that doesn’t work.
Clicking run should get you an error message as to why it fails?

@Heroinius it only takes one little miss step to leave you scratching your head as to why it didn’t do what you wanted it to do.
Been there done that, wash rinse and repeat. lol, =)

I did that and all programs are running now - even after I disconnected it from the PC.
This time I have no idea why. Probably just needed a reboot?

Yes, and when I plug the Tufty back in, I have to select the correct port again from the dropdown menu. It switches back to automatic detection.

1 Like

I think it is Micropython v 19. I think they have done it so that you can have two mc plugged into a PC on different ports and switch Thonny to talk to them in turn. If this is the case it will be wonderful when you want to test 2 Picos talking to each other.

I’ve just plugged in 2 Picos. One is on COM3 and the other on COM11 and YOU CAN switch between them. GREAT!

Untitled-1

It’s a very recent change, it had me scratching my head for a while trying to figure out why I was having issues. I swap Pico’s in and out all the time on this PC. If I plug the same one into the same USB port I’m fine. Switch to a different device, or different USB port, and I have to go and set the serial port manually again.
Now that I know what’s going on, its not that big a deal. Just very confusing for a while.

@Heroinius nice to hear you got it back up and working.