isaacjacobson
Well-known member
My first time working with a larger (3.5") TFT display. I noticed that the display interrupts the audio playback during the refresh. I've scraped through the forum [as best as I could] and didn't see anyone else running into this. Is the issue my setup? Or is it just known and accepted the SD wav can't occur during a TFT refresh?
My guess [and hope] is that I am doing something wrong.
Hardware Setup
Is reliable SD Wav playback incompatible with a 3.5" TFT display over SPI? Or is there a simple solution?
My guess [and hope] is that I am doing something wrong.
Hardware Setup
- Teensy 4.1 or Teensy MicroMod
- Adafruit 3.5" TFT HX8357 Display via SPI
- Builtin SD card (good quality sd; works just fine with everything else
Code:
#include <Adafruit_HX8357.h>
#include <Audio.h>
#include "SD.h"
#define TFT_CS 10
#define TFT_RST 32
#define TFT_DC 33
Adafruit_HX8357 tft = Adafruit_HX8357(TFT_CS, TFT_DC);
AudioPlaySdWav playSdWav1;
AudioOutputI2S audioOutput;
AudioConnection patchCord1(playSdWav1, 0, audioOutput, 0);
AudioConnection patchCord2(playSdWav1, 1, audioOutput, 1);
void setup(void) {
tft.begin();
tft.fillScreen(HX8357_BLACK);
SD.begin(BUILTIN_SDCARD);
AudioMemory(10);
playSdWav1.play("SDTEST1.WAV"); // audio start
}
void loop() {
tft.fillScreen(HX8357_RED); // audio stops here
delay(1000); // audio plays here
tft.fillScreen(HX8357_GREEN); // audio stops here
delay(1000); // audio plays here
tft.fillScreen(HX8357_BLUE); // audio stops here
delay(1000); // audio plays here
}
Is reliable SD Wav playback incompatible with a 3.5" TFT display over SPI? Or is there a simple solution?