Bitmap image issues on Adafruit 3.5" 320x480 Color TFT Touchscreen Breakout

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
jwinslade
 
Posts: 44
Joined: Fri May 21, 2021 12:00 pm

Bitmap image issues on Adafruit 3.5" 320x480 Color TFT Touchscreen Breakout

Post by jwinslade »

I have the Adafruit 3.5" 320x480 Color TFT Touchscreen Breakout connected to the Feather RP 2040. It works fine with the graphicstest sketch in the SPI mode.

I'm now trying to do the bitmap example (FeatherWingHX8357 sketch). I have connected the additional CCS pin to Digital 5 of the Feather as instructed and swapped the d/c and cs pins as instructed. Sanity check on the connections shows d/c going to Digital 10, and cs going to Digital 9.

I've tried both newly formatted 16g and 32g micro-SD cards, formatted with FAT32 as instructed. I've verified that all three image files are present, readable, and properly viewable with an image reader.

jsw@jsw-NUC9i9QNX:/media/jsw/B46A-3C14$ ls -l
total 536
-rw-r--r-- 1 jsw jsw 460856 Mar 16 2021 adabot.bmp
-rw-r--r-- 1 jsw jsw 61496 Dec 2 2020 parrot.bmp
-rw-r--r-- 1 jsw jsw 8420 Mar 16 2021 BANNED.bmp

When I use the 16g card I get files not found:

Initializing filesystem...OK!
Loading adabot.bmp to screen...File not found.
Querying parrot.bmp image size...File not found.
Loading BANNED.bmp to canvas...File not found.

When I try the 32g card, I get a filesystem begin failure.

Initializing filesystem...SD begin() failed

I've tried formatting these on both a Linux system and a Windows system with the same results.

I've looked over TFM to see if I'm missing something and I can't seem to find anything relevant.

Thanks.

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: Bitmap image issues on Adafruit 3.5" 320x480 Color TFT Touchscreen Breakout

Post by mikeysklar »

You mentioned you were using the FeatherWing example code "FeatherWingHX8357", but your not using a FeatherWing in your setup correct? Does this example code work any better for finding the images?

https://github.com/adafruit/Adafruit_HX ... bitmap.ino

I've seen another report in the forums of the file not found that was using an RP2040 based ItsyBisy. We did not resolve it, but a github issue should be opened if this sounds familiar.

viewtopic.php?f=47&p=916808

Were you able to use the FAT32 formatter that Adafruit recommends?
We strongly recommend you use the official SD card formatter utility - written by the SD association it solves many problems that come with bad formatting!
https://www.sdcard.org/downloads/formatter/


https://learn.adafruit.com/adafruit-mic ... or-2971670

User avatar
jwinslade
 
Posts: 44
Joined: Fri May 21, 2021 12:00 pm

Re: Bitmap image issues on Adafruit 3.5" 320x480 Color TFT Touchscreen Breakout

Post by jwinslade »

Thanks for the response.
mikeysklar wrote: Sun Sep 11, 2022 4:03 pm You mentioned you were using the FeatherWing example code "FeatherWingHX8357", but your not using a FeatherWing in your setup correct?
I think there is a bit of confusion here, both in my mind and on the Adafruit tutorial page, specifically this one: https://learn.adafruit.com/adafruit-3-5 ... s-spi-mode

I was not even aware that such a similar 'Featherwing' (brand) item existed until reading your response here.

When I selected the product (the 'breakout' version, Adafruit 3.5" 320x480 Color TFT Touchscreen Breakout) I went through the available selections here and on the other 'usual suspect' sites and chose this one (Adafruit 3.5" 320x480 Color TFT Touchscreen Breakout) because it is of reasonably small size and is 480 pixels wide in landscape mode, which is (barely) enough to show 80 columns of text, as confirmed on the DEADBEEF/Groop/Implore thee demo screen.

I quit looking at displays when the 'add to cart' buttons were replaced by 'notify me' buttons, so I never got down to the true 'Featherwing' version of this.

To add to the confusion, right at the top of this page, from the tutorial for the 'breakout' version (https://learn.adafruit.com/adafruit-3-5 ... s-spi-mode) is this line:
There is a built-in microSD card slot on the FeatherWing, and we can use that to load bitmap images!
I did not even think of it when I first read it.

In addition, the three-image demo/test sketch comes from this, which is definitely in the Featherwing camp:
Now select the sketch file→examples→Adafruit_ImageReader→FeatherWingHX8357
That came from the tutorial for the 'breakout' version.

mikeysklar wrote: Sun Sep 11, 2022 4:03 pm Does this example code work any better for finding the images?

https://github.com/adafruit/Adafruit_HX ... bitmap.ino
Yes and no (to make a long story long). ;-)

One thing I did as I was waiting for any response here is was a sanity check.

I've had previous issues before when using the Feather RP2040 in some projects originally meant for the older 'legacy' Feathers, and I have some of the legacy ones laying around, so I substituted a M0 Feather to see if I could duplicate the issue on that.

The result was pretty much the same, the graphics demo with the lines and triangles and DEADBEEF and such ran fine, but when it came to displaying the bitmap images in the three-image SPI bitmap image demo, it failed to open the file system.

I then noticed your response and tried the above-mentioned bitmap.ino demo and it loaded the image fine, on the M0 Feather that is. I did another sanity check and substituted the adabot.bmp image into that and it loaded and displayed it fine.

However, when I tried using that sketch on the RP2040 Feather, I got this compile error:
cannot convert 'arduino::SPISettings' to 'uint32_t' {aka 'long unsigned int'}
Plus a few warnings indicating that there are some 'dueling header files' such as:
Multiple libraries were found for "SdFat.h"
Used: /home/jsw/Arduino/libraries/SdFat_-_Adafruit_Fork
Not used: /home/jsw/.arduino15/packages/rp2040/hardware/rp2040/2.2.2/libraries/ESP8266SdFat
Before I go digging through the code and the header files and such, I want to see if I get a response from the Adafruit support folks, as they may be aware of things like this already.

Another sanity check I thought of doing was to use a 'clean' machine, one that has not had the Arduino IDE running on it for a few years and many versions and upgrades and such. I have a Pi Top which I can re-image very easily and then install clean (I see the board here did not like my v-word term for something that is unused) things like the latest Arduino IDE, latest versions of everything with nothing old and crufty lying around in the background and try it there.

However, I'll hold off and see if Adafruit support says anything before I do that.

mikeysklar wrote: Sun Sep 11, 2022 4:03 pm I've seen another report in the forums of the file not found that was using an RP2040 based ItsyBisy. We did not resolve it, but a github issue should be opened if this sounds familiar.

viewtopic.php?f=47&p=916808
I will take a look at that, thanks. I have a feeling that it may be due, at least partly, to some differences in the RP2040 feather vice the 'legacy' feathers, even though that three-part bitmap demo failed to work on the M0 as well as on the RP2040.

mikeysklar wrote: Sun Sep 11, 2022 4:03 pm Were you able to use the FAT32 formatter that Adafruit recommends?
If a question arises of the card, I will try that. I noticed it's available for Windows and Mac only, and not Linux.

I really don't think the card or format are in question, since the bitmap.ino successfully reads and displays the images off of the card inserted into the breakout. I've also had good luck reading images from cards in other Adafruit devices, such as the M0 Adalogger, using cards formatted on my main Ubuntu desktop and the home office PC (Windows) using the simple right-click format option.

Thanks again.

User avatar
jwinslade
 
Posts: 44
Joined: Fri May 21, 2021 12:00 pm

Re: Bitmap image issues on Adafruit 3.5" 320x480 Color TFT Touchscreen Breakout

Post by jwinslade »

As a follow-up here for those with similar issues, I never got the loading of images from the on-board SD card to be robust enough to use. Results are consistently inconsistent.

I worked around the issue by using a LittleFS (file system instance in a flash partition) on the main microcontroller to store the images. It works just fine, loads the images quickly and cleanly.

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

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”