Hallo,
ich hatte ein funktionierendes Projekt mit einem 3,5" TFT Display.
Das habe ich jetzt wieder aufgegriffen und muss die Pinbelegung ändern.
Seltsamerweise kann ich jetzt sogar die Pinbelegung löschen und es funktioniert!
Aber ich kann nichts mehr ändern. Habe gerade nen Vollaussetzer.
Mein funktionierendes Prog habe ich eingedampft:
#include <TFT_Controller_01.h> // Hardware-specific library !!!!
TFT_eSPI tft = TFT_eSPI(); // Invoke custom library
void setup() {
tft.init();
tft.setRotation(2);}
void loop() {
delay(100);
tft.drawString("Huhu", 50, 362, 2);}
Die TFT_Controller_01.h:
// Stop fonts etc being loaded multiple times
#ifndef _TFT_eSPIH_
#define _TFT_eSPIH_
#define TFT_ESPI_VERSION "2.2.6"
//Standard support
#include <Arduino.h>
#include <Print.h>
#include <SPI.h>
/***************************************************************************************
** Section 2: Load library and processor specific header files
***************************************************************************************/
// Include header file that defines the fonts loaded, the TFT drivers
// available and the pins to be used, etc, etc
// #include <User_Setup_Select.h> alt
#include <Controller_02.h> // geänderte Pinbelegung
// Handle FLASH based storage e.g. PROGMEM
#ifdef __AVR__
#include <avr/pgmspace.h>
....
der Rest ist unverändert und gekürzt, da sonst mehr als 9000 Zeichen
Hier ist der Controller_02.h
#ifndef USER_SETUP_LOADED // Lets PlatformIO users define settings in
// platformio.ini, see notes in "Tools" folder.
// Für 3,5 "
//#include <User_Setups/Setup11_RPi_touch_ILI9486.h> // Setup file configured for ESP32 and RPi TFT with touch
// See SetupX_Template.h for all options available
#define RPI_DISPLAY_TYPE
#define ILI9486_DRIVER // 20MHz maximum SPI
/*
#define TFT_SCLK 26 //26 // blau SCK
#define TFT_RST 27 //27 // grün Reset
#define TFT_CS 14 //14 // grau Chip select
#define TFT_MOSI 12 //12 // lila SDA Serial in
#define TFT_DC 13 //13 // gelb RS Data Command
*/
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
#define SMOOTH_FONT
#define SPI_FREQUENCY 20000000
#define SPI_TOUCH_FREQUENCY 2500000
//#define TFT_MISO 14 // 19 Serial Out
//---------------------------------------------------
#endif // USER_SETUP_LOADED
der Rest ist unverändert und gekürzt, da sonst mehr als 9000 Zeichen
Die Pfade funktionieren, da ich Fehlermeldungen bekomme, wenn ich die Controller_02.h umbenenne oder wichtige Bausteine lösche. Die Pins werden nur dort definiert, aber die Pinbelegung kann ich auskommentieren oder gar löschen. Trotzdem wird das "Huhu" unten links ausgegeben. Habe alles schon durchsucht. Oder wird das in irgendeinem anderen Modul nochmals definiert? Habe ich da was übersehen???? Gibt es da so was wie ein Fall-Back-Mode?