Hello,
I've been doing a few tests with this TFT display from Adafruit: https://www.adafruit.com/product/3787 and have been running into problems with initializing and loading files from the included microSD slot.
It seems to happen at random. Sometimes, I can load an image to the screen fine with only a few lost pixels. Other times, the image is partially corrupted when it loads or can't be found at all. And other times still, the SD card itself fails to initialize. The only thing I'm doing between each attempt is plugging and unplugging the USB.
I know it's a Teensy problem because I wired it up on an Arduino Uno and the microSD + display have been working flawlessly. I suspect it has something to do with how fast the Teensy is compared to the Arduino, but I don't know enough to be able to fully pinpoint the problem myself.
I've attached the script I've been running to this post. The SD card I'm using is a SanDisk microSDHC formatted FAT32. I've tried everything from decreasing the buffer size to adding a delay both in this script and in the SD library to give it more time to boot up to switching libraries from SD to SdFat and so far nothing has worked. Any insight or suggestions would be appreciated!
I've been doing a few tests with this TFT display from Adafruit: https://www.adafruit.com/product/3787 and have been running into problems with initializing and loading files from the included microSD slot.
It seems to happen at random. Sometimes, I can load an image to the screen fine with only a few lost pixels. Other times, the image is partially corrupted when it loads or can't be found at all. And other times still, the SD card itself fails to initialize. The only thing I'm doing between each attempt is plugging and unplugging the USB.
I know it's a Teensy problem because I wired it up on an Arduino Uno and the microSD + display have been working flawlessly. I suspect it has something to do with how fast the Teensy is compared to the Arduino, but I don't know enough to be able to fully pinpoint the problem myself.
I've attached the script I've been running to this post. The SD card I'm using is a SanDisk microSDHC formatted FAT32. I've tried everything from decreasing the buffer size to adding a delay both in this script and in the SD library to give it more time to boot up to switching libraries from SD to SdFat and so far nothing has worked. Any insight or suggestions would be appreciated!