Hallo zusammen,
ich hoffe, das ihr mir helfen könnt.
Zur Zeit betreibe ich drei TFTs (1,77" AZ-Delivery) an einem ESP8266 Amica V2 (Link) parallel und ohne Probleme mit folgendem Sketch (gekürzt):
#include "Ucglib.h"
#include "ESP8266WiFi.h"
#include <PubSubClient.h>
#include <SPI.h>Ucglib_ST7735_18x128x160_HWSPI tft1(/cd=/ 2, /cs=/ 15, /reset=/ -1); /* HW SPI Adapter /
Ucglib_ST7735_18x128x160_HWSPI tft2(/cd=/ 2, /cs=/ 4, /reset=/ -1); / HW SPI Adapter /
Ucglib_ST7735_18x128x160_HWSPI tft3(/cd=/ 2, /cs=/ 5, /reset=/ -1); / HW SPI Adapter */void setup() {
tft1.begin(UCG_FONT_MODE_SOLID);
tft1.setFont(ucg_font_helvB08_hf);
tft1.setRotate270();
tft1.clearScreen();
tft2.begin(UCG_FONT_MODE_SOLID);
tft2.setFont(ucg_font_helvB08_hf);
tft2.setRotate90();
tft2.clearScreen();
tft3.begin(UCG_FONT_MODE_SOLID);
tft3.setFont(ucg_font_helvB08_hf);
tft3.setRotate270();
tft3.clearScreen();
}void loop() {
tft1.setColor(255, 200, 170);
tft1.setColor(1, 0, 100, 120);
tft1.setPrintPos(20, 20);
tft1.print("Ich bin TFT1");
tft2.setColor(255, 200, 170);
tft2.setColor(1, 0, 100, 120);
tft2.setPrintPos(20, 20);
tft2.print("Ich bin TFT2");
tft3.setColor(255, 200, 170);
tft3.setColor(1, 0, 100, 120);
tft3.setPrintPos(20, 20);
tft3.print("Ich bin TFT3");
}
Nun möchte ich auf den ESP32 umsteigen (Link).
Wenn ich Arduino IDE auf den ESP32 umstelle, und das selbe Sketch benutze, bekomme ich nur ein TFT zum laufen. Verdrahtet habe ich das so:
23 (MOSI) an alle SDA
18 (SCK) an alle SCK
17 an alle RES
16 an alle RS
5 (SS) an CS TFT1
4 an CS TFT2
0 an CS TFT3
Die UCGLIB-Befehle hatte ich auf die oben genannten GPIOs angepasst.
Ich hoffe, das ihr mir helfen könnt, dieses Problem zu lösen, auf jeden Fall schon mal vielen Dank im voraus!