Trouble with Project: Touch Deck: DIY Customizable TFT Contr

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
MoppleKitchensheep
 
Posts: 4
Joined: Tue Nov 23, 2021 3:26 pm

Trouble with Project: Touch Deck: DIY Customizable TFT Contr

Post by MoppleKitchensheep »

Greetings from germany,

i'm having trouble with the "Touch Deck: DIY Customizable TFT Control Pad"-Project...

I just got my Feather RP2040 and wanted to use it with the Feather 3.5" tft-display by recreating the Touch Deck. Everything was going great... Uploading "adafruit-circuitpython-adafruit_feather_rp2040-en_US-7.0.0.uf2" and copying all files and folders from the zip-files "CircuitPython 7.x"-directory on the projects webpage.

But after resetting the feather rp2040, it wasn't loading the icons from the "touch_deck_icons"-directory. Instead it displayed just colored scares where the icons should be. I was able to switch between the three different layers and use different functions like volume up or volume down, so the assosiated functions seemed to be working as intended, but it didn't want to load the icons.
When i renamed or deleted the "touch_deck_icons"-directory on the CIRCUITPY-drive, i got a error-massage informing me that the script could not load "touch_deck_icons/layer_next.bmp". As i would expect...

I looks like the script can access the "touch_deck_icons"-directory, but can't load the icons...

Can someone help me?
20211123_205319.jpg
20211123_205319.jpg (133.32 KiB) Viewed 559 times

User avatar
danhalbert
 
Posts: 4652
Joined: Tue Aug 08, 2017 12:37 pm

Re: Trouble with Project: Touch Deck: DIY Customizable TFT C

Post by danhalbert »

The icon files may have been incompletely or not copied. Windows and Linux don't write files to the drive right away. You need to do `sync` on Linux or `Eject` on Windows. Try copying the files again.

If you reset or power-cycled the board before the copies were finished, you might also have a corrupt CIRCUITPY filesystem. To fix that, in the REPL do:

Code: Select all

import storage
storage.erase_filesystem()
You will need to copy everything back to CIRCUITPY again.

If you are still having trouble, try using CircuitPython 6.3.0, in case an unknown bug has been introduced. Let us know if 6.3.0 works but 7.0.0 does not.

User avatar
MoppleKitchensheep
 
Posts: 4
Joined: Tue Nov 23, 2021 3:26 pm

Re: Trouble with Project: Touch Deck: DIY Customizable TFT C

Post by MoppleKitchensheep »

I have tried to eject the drive... not ejecting or reseting the board at all and saving code.py via Mu-editor. Nothing worked. Even repeating the copy procedure under linux (and safely ejecting the drive there) didn't show any different results.

After using nuke_flash.uf2 i tried to use CircuitPython 6.3.0, along with the associated flies from the project page download, with the only difference being that there were no colored squares as in the picture i posted, but only the white text labels.

Interestingly when i connected the board with CircuitPython 7.0.0 to the Mu-editors serial console the code.py output was: "No SD card found: no SD card". But there was no such output with with CircuitPython 6.3.0.

When i followed your suggestion of erasing the file system with the REPL commands, it didn't seem to do anything besides ejecting CIRCUITPY.

User avatar
danhalbert
 
Posts: 4652
Joined: Tue Aug 08, 2017 12:37 pm

Re: Trouble with Project: Touch Deck: DIY Customizable TFT C

Post by danhalbert »

OK, so that's not the problem :) . Are you using the exact code from the guide? Could you post a screenshot of your file layout in CIRCUITPY, including subdirectories?

User avatar
MoppleKitchensheep
 
Posts: 4
Joined: Tue Nov 23, 2021 3:26 pm

Re: Trouble with Project: Touch Deck: DIY Customizable TFT C

Post by MoppleKitchensheep »

Hi danhalbert,

first i want to thank you for your help. ;-)
I'm using the exact code from the guide. Just copy and paste from the downloaded zip-file.

I just tried again, following these steps:
1. Flash resetting using "flash_nuke.uf2"
2. Copying "adafruit-circuitpython-adafruit_feather_rp2040-en_US-7.0.0.uf2" to the RPI-RP"-drive
3. Copying everything from the guides download "CircuitPython_Touch_Deck\CircuitPython 7.x" to the CIRCUITPI-drive, including "code.py"
---no resetting or power cycling the board---
4. Automatic execution of code.py gave me no loaded icons again, just colored squares but the intended functions worked just fine.

These are the directorys and subdirectorys of the CIRCUITPY-drive:
CIRCUITPY.jpg
CIRCUITPY.jpg (75.27 KiB) Viewed 536 times
Content of lib-directory:
lib-directory.jpg
lib-directory.jpg (125.28 KiB) Viewed 536 times
The icon-files in the touch_deck_icons-directory are all accessible via the explorer. I can open them without any trouble. And so are all other files in the CIRCUITPY-drive.

User avatar
danhalbert
 
Posts: 4652
Joined: Tue Aug 08, 2017 12:37 pm

Re: Trouble with Project: Touch Deck: DIY Customizable TFT C

Post by danhalbert »

I have reproduced this problem on both a Feather RP2040 and a Feather M4 running 7.0.0 and 6.3.0. Not sure what versions were in use when it was working. I'll make some inquiries.

User avatar
danhalbert
 
Posts: 4652
Joined: Tue Aug 08, 2017 12:37 pm

Re: Trouble with Project: Touch Deck: DIY Customizable TFT C

Post by danhalbert »

I've found there's a bug in one of the libraries that needs to be fixed. Here's a temporary fix for you:

Replace lib/adafruit_display_layout/widgets/icon_widget.mpy with the icon_widget.py file in this zip file. We'll fix the library as soon as we can.
Attachments
icon_widget.py.zip
unzip this first
(1.46 KiB) Downloaded 3 times

User avatar
MoppleKitchensheep
 
Posts: 4
Joined: Tue Nov 23, 2021 3:26 pm

Re: Trouble with Project: Touch Deck: DIY Customizable TFT C

Post by MoppleKitchensheep »

Hey danhalbert,

I replaced the icon_widget.mpy with your icon_wiget.py and it works just fine now.

thank you very much!!! Now the Touch Deck looks very nice. :-)

User avatar
danhalbert
 
Posts: 4652
Joined: Tue Aug 08, 2017 12:37 pm

Re: Trouble with Project: Touch Deck: DIY Customizable TFT C

Post by danhalbert »

Great! This fix is now in the latest version of adafruit_display_layout, which you can find in the latest library bundle: 20211125 or later. Or, if you download the Project Bundle again, the fix should be in there.

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”