Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 3 of 3

Thread: Library problems: how to read image off SD card and display on screen, Teensy 4.1

  1. #1
    Junior Member
    Join Date
    May 2021
    Posts
    13

    Library problems: how to read image off SD card and display on screen, Teensy 4.1

    I had a Teensy 3.6 program that (among other things) displayed an image from an SD card on the Teensy touchscreen. I switched to Teensy 4.1 and can't get the libraries to work together. In particular, I was using Adafruit_ImageReader to load the image, but it needs the Adafruit fork of SdFat, which doesn't compile on 4.1. The stock SdFat library compiles, but the image reader doesn't work with it.

    Here's the code that fails to compile:
    Code:
    #include <Adafruit_GFX.h>    // Core graphics library
    #include <SdFat.h>                // SD card & FAT filesystem library
    #include <SPI.h>
    #include <Wire.h>
    #include <Adafruit_ILI9341.h>
    #include <Adafruit_ImageReader.h> // Image-reading functions
    void setup() {}
    void loop() {}
    To summarize, I'm looking for straightforward libraries to use the Teensy 4.1 and Teensy touchscreen, that support loading images, graphics operations, and touchscreen operations. I'm not particularly attached to the libraries above so I'm happy to switch. I need a fast SD card library for other reasons so I think I want to stick with SdFat.

    Thanks,
    Ken

  2. #2
    You can use this combination in teensy 4 or 4.1
    - ILI9341_t3
    - XPT2046_Touchscreen
    - JPEGDEC
    - SD or SdFat

  3. #3
    Junior Member
    Join Date
    May 2021
    Posts
    13
    Thanks for the suggestion!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •