I am building a project where some data are read from SD card, and after being processed are written on a TFT screen.
The SD card is mounted on a simple module, and the screen is a 1.8" Adafruit display with the ST7735R driver. They both use the SPI interface.
When i run the program that read data from SD and after processing write them on the Serial Monitor, there are no problems. But when i add to the code, the initialization of the TFT, I can't read anything from the Serial Monitor.
All these instruction are inside the Void Setup(), in a while(file.available()) cycle. Even if I try to text something on the screen nothing appears.
But if i put the same instruction outside the while cycle, both the TFT and the Serial Monitor works.
I am sure that the file is always available.
Can somebody help me?