SdFat - ENABLE_EXTENDED_TRANSFER_CLASS

Hello.

I am an absolute newbee in Arduino programming, so please forgive my programming mistakes.

I’m using the following hardware:
Arduino Mega 2560
Adafruit 2.8" TFT LCD Shield Cap Touch (TFT: ILI9341 SPI - TS: FT6206 I2C)

I would like to build a display for my VW Beetle, on which I can display operating data over several pages.

The first page should be filled with a VW bitmap and jump to the second page after touching it.

I can’t get the program to run. As soon as i add the library “Adafruit_ImageReader.h” I get the following error message:

[…]
Adafruit_SPIFlash.h:38:2: error: #error ENABLE_EXTENDED_TRANSFER_CLASS must be set to 1 in SdFat SdFatConfig.h

  • #error ENABLE_EXTENDED_TRANSFER_CLASS must be set to 1 in SdFat SdFatConfig.h*
  • ^~~~~*
    exit status 1
    Fehler beim Kompilieren für das Board Arduino Mega or Mega 2560.

This is my header:

#include “SPI.h”
#include “Adafruit_GFX.h”
#include “Adafruit_ILI9341.h”
#include “Wire.h”
#include “Adafruit_FT6206.h”
#include “SD.h”
#include “Adafruit_ImageReader.h”

#define TFT_DC 9
#define TFT_CS 10
#define SD_CS 4

Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
Adafruit_FT6206 ctp = Adafruit_FT6206();
Adafruit_FT6206 ts = Adafruit_FT6206();

How can I gte this problem solved?

Regards

DANIEL

The easier you make it to read and copy the code the more likely it is that you will get help

Please follow the advice given in the link below when posting code , use code tags and post the code here

Maybe by doing as the error message suggests and changing the SdFatConfig.h file

In the copy of the file on my PC it is currently set as follows

 * If the symbol ENABLE_EXTENDED_TRANSFER_CLASS is nonzero, the class SdFatEX
 * will be defined. If the symbol ENABLE_SOFTWARE_SPI_CLASS is also nonzero,
 * the class SdFatSoftSpiEX will be defined.
 *
 * These classes used extended multi-block SD I/O for better performance.
 * the SPI bus may not be shared with other devices in this mode.
 */
#define ENABLE_EXTENDED_TRANSFER_CLASS 0

Hi UKHeliBob.

Thank you for your prompt reply.

This is my code:

/**********************FARBEN************************** 
ILI9341_BLACK               0x0000 ///<   0,   0,   0
ILI9341_NAVY                0x000F ///<   0,   0, 123
ILI9341_DARKGREEN           0x03E0 ///<   0, 125,   0
ILI9341_DARKCYAN            0x03EF ///<   0, 125, 123
ILI9341_MAROON              0x7800 ///< 123,   0,   0
ILI9341_PURPLE              0x780F ///< 123,   0, 123
ILI9341_OLIVE               0x7BE0 ///< 123, 125,   0
ILI9341_LIGHTGREY           0xC618 ///< 198, 195, 198
ILI9341_DARKGREY            0x7BEF ///< 123, 125, 123
ILI9341_BLUE                0x001F ///<   0,   0, 255
ILI9341_GREEN               0x07E0 ///<   0, 255,   0
ILI9341_CYAN                0x07FF ///<   0, 255, 255
ILI9341_RED                 0xF800 ///< 255,   0,   0
ILI9341_MAGENTA             0xF81F ///< 255,   0, 255
ILI9341_YELLOW              0xFFE0 ///< 255, 255,   0
ILI9341_WHITE               0xFFFF ///< 255, 255, 255
ILI9341_ORANGE              0xFD20 ///< 255, 165,   0
ILI9341_GREENYELLOW         0xAFE5 ///< 173, 255,  41
ILI9341_PINK                0xFC18 ///< 255, 130, 198
*/

#include "SPI.h"
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9341.h"
#include "Wire.h"                                           // this is needed for FT6206
#include "Adafruit_FT6206.h"
#include "SD.h"
#include "Adafruit_ImageReader.h"                           // Image-reading functions


#define TFT_DC  9
#define TFT_CS 10
#define SD_CS 4


Adafruit_ILI9341  tft   = Adafruit_ILI9341(TFT_CS, TFT_DC);
Adafruit_FT6206   ctp   = Adafruit_FT6206();                  // The FT6206 uses hardware I2C (SCL/SDA)
Adafruit_FT6206   ts    = Adafruit_FT6206();

int ThermistorPin08 = 8;              // Analogsignal Sensor Öl Vorlauf   an Pin Analog_In 08
int ThermistorPin09 = 9;              // Analogsignal Sensor Öl Rücklauf  an Pin Analog_In 09
int ThermistorPin10 = 10;             // Analogsignal Sensor Zylinder 1   an Pin Analog_In 10
int ThermistorPin11 = 11;             // Analogsignal Sensor Zylinder 2   an Pin Analog_In 11
int ThermistorPin12 = 12;             // Analogsignal Sensor Zylinder 3   an Pin Analog_In 12
int ThermistorPin13 = 13;             // Analogsignal Sensor Zylinder 4   an Pin Analog_In 13
int Vo;
int Seitenzahl;
int Zyl_1, Zyl_2, Zyl_3, Zyl_4, Oil_in, Oil_out, Zyl_1_old, Zyl_2_old, Zyl_3_old, Zyl_4_old, Oil_in_old, Oil_out_old;

bool T_Zyl_1_Fail, T_Zyl_2_Fail, T_Zyl_3_Fail, T_Zyl_4_Fail, T_Oil_in_Fail, T_Oil_out_Fail, Global_Fail;

float R1 = 10000;
float logR2, R2, T, T_Zyl_1, T_Zyl_2, T_Zyl_3, T_Zyl_4, T_Oil_in, T_Oil_out;
float c1 = 1.009249522e-03, c2 = 2.378405444e-04, c3 = 2.019202697e-07;

void setup() {
  Serial.begin(9600);
  tft.begin();
  ts.begin();
  Seitenzahl = 0;
  
  //*******************QUERFORMAT********************* 
  tft.setRotation(-1);
  
  //*******************HINTERGRUND********************* 
  tft.fillScreen(ILI9341_BLACK);

  //*******************ÜBERSCHRIFT********************* 
  tft.setCursor(60, 100);                              
  tft.setTextColor(ILI9341_WHITE);
  tft.setTextSize(4);
  tft.print("VW KÄFER");

}

//****************************************************************************************

void loop()
{

while (Seitenzahl == 0)
{
  SEITE_BITMAP();
}

while (Seitenzahl == 1)
{
  SEITE_TEMPERATUREN();
}

while (Seitenzahl == 2)
{
  SEITE_2();
}
}


//****************************************************************************************
//******************************   S E I T E   0   ***************************************
//****************************************************************************************

void SEITE_BITMAP()

{
  //***************SPRUNG ZU SEITE 1*********************
  if (ts.touched())
  {   
    Seitenzahl = 1;
  }

}

//****************************************************************************************
//******************************   S E I T E   1   ***************************************
//****************************************************************************************

void SEITE_TEMPERATUREN()
{

  //*******************QUERFORMAT********************* 
  tft.setRotation(-1);
  
  //*******************HINTERGRUND********************* 
  tft.fillScreen(ILI9341_BLACK);

  
  //*******************LINIEN************************** //Linie: tft.drawLine(x1, y1, x2, y2, color);
  tft.drawLine(0, 26, 320, 26, ILI9341_GREEN);        // waagerechte Linien
  tft.drawLine(0, 133, 320, 133, ILI9341_GREEN);        
  tft.drawLine(77, 26, 77, 240, ILI9341_GREEN);       // senkrechte Linien
  tft.drawLine(159, 26, 159, 240, ILI9341_GREEN);
  tft.drawLine(241, 26, 241, 133, ILI9341_GREEN);
  
  //*******************ÜBERSCHRIFT********************* 
  tft.setCursor(50, 0);                              
  tft.setTextColor(ILI9341_BLUE);
  tft.setTextSize(3);
  tft.print("TEMPERATUREN");

  //**************EINHEITEN & BEZEICHNUNGEN************** 
  tft.setCursor(3, 137);                                // Bezeichnung Öl Vorlauf
  tft.setTextColor(ILI9341_WHITE);
  tft.setTextSize(2);
  tft.print("Oil");
  tft.setTextSize(1);
  tft.print(" ");
  tft.setTextSize(2);
  tft.print("in");

  tft.setCursor(81, 137);                                // Bezeichnung Öl Rücklauf
  tft.setTextColor(ILI9341_WHITE);
  tft.setTextSize(2);
  tft.print("Oil");
  tft.setTextSize(1);
  tft.print(" ");
  tft.setTextSize(2);
  tft.print("out");
  
  tft.setCursor(6, 30);                                // Bezeichnung Zylinder 1
  tft.setTextColor(ILI9341_WHITE);
  tft.setTextSize(2);
  tft.print("Zyl 1");

  tft.setCursor(88, 30);                               // Bezeichnung Zylinder 2
  tft.setTextColor(ILI9341_WHITE);
  tft.setTextSize(2);
  tft.print("Zyl 2");

  tft.setCursor(170, 30);                              // Bezeichnung Zylinder 3
  tft.setTextColor(ILI9341_WHITE);
  tft.setTextSize(2);
  tft.print("Zyl 3");

  tft.setCursor(252, 30);                              // Bezeichnung Zylinder 4
  tft.setTextColor(ILI9341_WHITE);
  tft.setTextSize(2);
  tft.print("Zyl 4");


  tft.setCursor(19, 70);
  tft.setTextColor(ILI9341_GREEN);
  tft.setTextSize(2);
  tft.print(Zyl_1);
  tft.setTextSize(1);
  tft.print(" C");

  tft.setCursor(101, 70);
  tft.setTextColor(ILI9341_GREEN);
  tft.setTextSize(2);
  tft.print(Zyl_2);
  tft.setTextSize(1);
  tft.print(" C");

  tft.setCursor(183, 70);
  tft.setTextColor(ILI9341_GREEN);
  tft.setTextSize(2);
  tft.print(Zyl_3);
  tft.setTextSize(1);
  tft.print(" C");

  tft.setCursor(265, 70);
  tft.setTextColor(ILI9341_GREEN);
  tft.setTextSize(2);
  tft.print(Zyl_4);
  tft.setTextSize(1);
  tft.print(" C");

  tft.setCursor(19, 180);
  tft.setTextColor(ILI9341_GREEN);
  tft.setTextSize(2);
  tft.print(Oil_in);
  tft.setTextSize(1);
  tft.print(" C");

  tft.setCursor(101, 180);  
  tft.setTextColor(ILI9341_GREEN);
  tft.setTextSize(2);
  tft.print(Oil_out);
  tft.setTextSize(1);
  tft.print(" C");

  //**************RECHTECK MIT PFEIL -- VON SEITE 1 ZU SEITE 2 BLÄTTERN************** 

  tft.fillRect(269, 210, 50, 30, ILI9341_WHITE);
  tft.setCursor(272, 218);
  tft.setTextColor(ILI9341_BLACK);
  tft.setTextSize(2);
  tft.print(" -> ");

  while (Seitenzahl == 1)
  {

    // Zylinder_1
    Vo = analogRead(ThermistorPin10);
    R2 = R1 * (1023.0 / (float)Vo - 1.0);
    logR2 = log(R2);
    T = (1.0 / (c1 + c2*logR2 + c3*logR2*logR2*logR2));
    T_Zyl_1 = T - 273.15;
    if (T_Zyl_1 == -273.15)                                     //  Überprüfung Sensor - defekter oder nicht angeschlossener Sensor gibt "-273,15" aus
    {
      (T_Zyl_1_Fail = 1);
    }
    if (T_Zyl_1 != -273.15)
    {
      (T_Zyl_1_Fail = 0);
    }
    Zyl_1 = T_Zyl_1;                                         // float to integer
  
    // Zylinder_2
    Vo = analogRead(ThermistorPin11);
    R2 = R1 * (1023.0 / (float)Vo - 1.0);
    logR2 = log(R2);
    T = (1.0 / (c1 + c2*logR2 + c3*logR2*logR2*logR2));
    T_Zyl_2 = T - 273.15;
    if (T_Zyl_2 == -273.15)                                     //  Überprüfung Sensor - defekter oder nicht angeschlossener Sensor gibt "-273,15" aus
    {
      (T_Zyl_2_Fail = 1);
    }
    if (T_Zyl_2 != -273.15)
    {
      (T_Zyl_2_Fail = 0);
    }
    Zyl_2 = T_Zyl_2;                                         // float to integer

    // Zylinder_3
    Vo = analogRead(ThermistorPin12);
    R2 = R1 * (1023.0 / (float)Vo - 1.0);
    logR2 = log(R2);
    T = (1.0 / (c1 + c2*logR2 + c3*logR2*logR2*logR2));
    T_Zyl_3 = T - 273.15;
    if (T_Zyl_3 == -273.15)                                     //  Überprüfung Sensor - defekter oder nicht angeschlossener Sensor gibt "-273,15" aus
    {
      (T_Zyl_3_Fail = 1);
    }
    if (T_Zyl_3 != -273.15)
    {
      (T_Zyl_3_Fail = 0);
    }
    Zyl_3 = T_Zyl_3;                                         // float to integer

    // Zylinder_4
    Vo = analogRead(ThermistorPin13);
    R2 = R1 * (1023.0 / (float)Vo - 1.0);
    logR2 = log(R2);
    T = (1.0 / (c1 + c2*logR2 + c3*logR2*logR2*logR2));
    T_Zyl_4 = T - 273.15;
    if (T_Zyl_4 == -273.15)                                     //  Überprüfung Sensor - defekter oder nicht angeschlossener Sensor gibt "-273,15" aus
    {
      (T_Zyl_4_Fail = 1);
    }
    if (T_Zyl_4 != -273.15)
    {
      (T_Zyl_4_Fail = 0);
    }
    Zyl_4 = T_Zyl_4;                                         // float to integer

    // Öl Vorlauf
    Vo = analogRead(ThermistorPin08);
    R2 = R1 * (1023.0 / (float)Vo - 1.0);
    logR2 = log(R2);
    T = (1.0 / (c1 + c2*logR2 + c3*logR2*logR2*logR2));
    T_Oil_in = T - 273.15;
    if (T_Oil_in == -273.15)                                     //  Überprüfung Sensor - defekter oder nicht angeschlossener Sensor gibt "-273,15" aus
    {
      (T_Oil_in_Fail = 1);
    }
    if (T_Oil_in != -273.15)
    {
      (T_Oil_in_Fail = 0);
    }
    Oil_in = T_Oil_in;                                         // float to integer

    // Öl Rücklauf
    Vo = analogRead(ThermistorPin09);
    R2 = R1 * (1023.0 / (float)Vo - 1.0);
    logR2 = log(R2);
    T = (1.0 / (c1 + c2*logR2 + c3*logR2*logR2*logR2));
    T_Oil_out = T - 273.15;
    if (T_Oil_out == -273.15)                                     //  Überprüfung Sensor - defekter oder nicht angeschlossener Sensor gibt "-273,15" aus
    {
      (T_Oil_out_Fail = 1);
    }
    if (T_Oil_out != -273.15)
    {
      (T_Oil_out_Fail = 0);
    }
    Oil_out = T_Oil_out;                                         // float to integer


    // SAMMELSTÖRUNG
    Global_Fail = T_Zyl_1_Fail or T_Zyl_2_Fail or T_Zyl_3_Fail or T_Zyl_4_Fail or T_Oil_in_Fail or T_Oil_out_Fail;
  

    //*******************SERIELLER MONITOR************************** 

    Serial.print("Zylinder 1: ");
    Serial.print(T_Zyl_1);
    Serial.print("°C   ");
    Serial.print("Zylinder 2: ");
    Serial.print(T_Zyl_2);
    Serial.print("°C   ");
    Serial.print("Zylinder 3: ");
    Serial.print(T_Zyl_3);
    Serial.print("°C   ");
    Serial.print("Zylinder 4: ");
    Serial.print(T_Zyl_4);
    Serial.print("°C   ");
    Serial.print("Öl Vorlauf: ");
    Serial.print(T_Oil_in);
    Serial.print("°C   ");
    Serial.print("Öl Rücklauf: ");
    Serial.print(T_Oil_out);
    Serial.println("°C");
    delay(500);

    //*******************WERTE UND TEXTE**ZYLINDER  1***************

    if (T_Zyl_1 == -273.15)                                 // Ausfall Sensor Zylinder 1
    {
      tft.fillRect(0, 70, 77, 15, ILI9341_BLACK);           // Messwert mit schwarzem Rechteck überschreiben
      tft.setCursor(0, 70);
      tft.setTextColor(ILI9341_GREEN);
      tft.setTextSize(2);
      tft.print(" -----");
    }
    
    if (Zyl_1_old != Zyl_1)                              // Temperatur Zylinder 1
    {
      tft.fillRect(0, 70, 77, 15, ILI9341_BLACK);           // Messwert mit schwarzem Rechteck überschreiben
      tft.setCursor(19, 70);
      tft.setTextColor(ILI9341_GREEN);
      tft.setTextSize(2);
      tft.print(Zyl_1);
      tft.setTextSize(1);
      tft.print(" C");
      Zyl_1_old = Zyl_1;
    }

    //*******************WERTE UND TEXTE**ZYLINDER  2***************

    if (T_Zyl_2 == -273.15)                                 // Ausfall Sensor Zylinder 1
    {
      tft.fillRect(82, 70, 77, 15, ILI9341_BLACK);           // Messwert mit schwarzem Rechteck überschreiben
      tft.setCursor(82, 70);
      tft.setTextColor(ILI9341_GREEN);
      tft.setTextSize(2);
      tft.print(" -----");
    }

    if (Zyl_2_old != Zyl_2)                                   // Temperatur Zylinder 2
    {
      tft.fillRect(82, 70, 77, 15, ILI9341_BLACK);           // Messwert mit schwarzem Rechteck überschreiben
      tft.setCursor(101, 70);
      tft.setTextColor(ILI9341_GREEN);
      tft.setTextSize(2);
      tft.print(Zyl_2);
      tft.setTextSize(1);
      tft.print(" C");
      Zyl_2_old = Zyl_2;
    }

    //*******************WERTE UND TEXTE**ZYLINDER  3***************

    if (T_Zyl_3 == -273.15)                                 // Ausfall Sensor Zylinder 3
    {
      tft.fillRect(164, 70, 77, 15, ILI9341_BLACK);           // Messwert mit schwarzem Rechteck überschreiben
      tft.setCursor(164, 70);
      tft.setTextColor(ILI9341_GREEN);
      tft.setTextSize(2);
      tft.print(" -----");
    }

    if (Zyl_3_old != Zyl_3)                              // Temperatur Zylinder 3
    {
      tft.fillRect(164, 70, 77, 15, ILI9341_BLACK);           // Messwert mit schwarzem Rechteck überschreiben
      tft.setCursor(183, 70);
      tft.setTextColor(ILI9341_GREEN);
      tft.setTextSize(2);
      tft.print(Zyl_3);
      tft.setTextSize(1);
      tft.print(" C");
      Zyl_3_old = Zyl_3;
    }

    //*******************WERTE UND TEXTE**ZYLINDER  4***************

    if (T_Zyl_4 == -273.15)                                 // Ausfall Sensor Zylinder 4
    {
      tft.fillRect(246, 70, 77, 15, ILI9341_BLACK);           // Messwert mit schwarzem Rechteck überschreiben
      tft.setCursor(246, 70);
      tft.setTextColor(ILI9341_GREEN);
      tft.setTextSize(2);
      tft.print(" -----");
    }
 
    if (Zyl_4_old != Zyl_4)                              // Temperatur Zylinder 4
    {
      tft.fillRect(246, 70, 77, 15, ILI9341_BLACK);           // Messwert mit schwarzem Rechteck überschreiben
      tft.setCursor(265, 70);
      tft.setTextColor(ILI9341_GREEN);
      tft.setTextSize(2);
      tft.print(Zyl_4);
      tft.setTextSize(1);
      tft.print(" C");
      Zyl_4_old = Zyl_4;
    }
  
    //*******************WERTE UND TEXTE**ÖL  VORLAUF***************

    if (T_Oil_in == -273.15)                                 // Ausfall Sensor Öl Vorlauf
    {
      tft.fillRect(0, 180, 77, 15, ILI9341_BLACK);           // Messwert mit schwarzem Rechteck überschreiben
      tft.setCursor(0, 180);
      tft.setTextColor(ILI9341_GREEN);
      tft.setTextSize(2);
      tft.print(" -----");
    }

    if (Oil_in_old != Oil_in)                                 // Temperatur Öl Vorlauf
    {
      tft.fillRect(0, 180, 77, 15, ILI9341_BLACK);           // Messwert mit schwarzem Rechteck überschreiben
      tft.setCursor(19, 180);
      tft.setTextColor(ILI9341_GREEN);
      tft.setTextSize(2);
      tft.print(Oil_in);
      tft.setTextSize(1);
      tft.print(" C");
      Oil_in_old = Oil_in;
    }

    //*******************WERTE UND TEXTE**ÖL  RÜCKLAUF***************

    if (T_Oil_out == -273.15)                                 // Ausfall Sensor Öl Rücklauf
    {
      tft.fillRect(82, 180, 77, 15, ILI9341_BLACK);           // Messwert mit schwarzem Rechteck überschreiben
      tft.setCursor(82, 180);
      tft.setTextColor(ILI9341_GREEN);
      tft.setTextSize(2);
      tft.print(" -----");
    }

    if (Oil_out_old != Oil_out)                              // Temperatur Öl Rücklauf
    {
      tft.fillRect(82, 180, 77, 15, ILI9341_BLACK);           // Messwert mit schwarzem Rechteck überschreiben
      tft.setCursor(101, 180);
      tft.setTextColor(ILI9341_GREEN);
      tft.setTextSize(2);
      tft.print(Oil_out);
      tft.setTextSize(1);
      tft.print(" C");
      Oil_out_old = Oil_out;
    }

    //*******************WERTE UND TEXTE**SAMMELSTÖRUNG***************

    if (Global_Fail == 1)                                         // Event Sammelstörung
    {
      tft.fillRect(229, 170, 61, 40, ILI9341_RED);                // Rotes Quadrat rechts unten in der Ecke
      tft.setCursor(230, 185);
      tft.setTextColor(ILI9341_WHITE);
      tft.setTextSize(2);
      tft.print("ALARM");
    }

    if (Global_Fail == 0)                                         // Event Sammelstörung
    {
      tft.fillRect(229, 170, 61, 40, ILI9341_BLACK);              // Rotes Quadrat rechts unten in der Ecke überschreiben
    }

    //***************************PUSH-BEFEHL -- VON SEITE 1 ZU SEITE 2 BLÄTTERN***************************

    if (ts.touched())
    {   
      TS_Point p = ts.getPoint();
      p.x = map(p.x, 0, 240, 240, 0);
      p.y = map(p.y, 0, 320, 320, 0);
      int x = p.x;
      int y = p.y;
      if( x > 210 && x < 240 && y > 0 && y < 50 && Seitenzahl == 1)
      {
        Seitenzahl = 2;
        Serial.println("Softbutton: vor zu Seite 2");
      }
    }

  }
}
//****************************************************************************************
//******************************   S E I T E   2   ***************************************
//****************************************************************************************

void SEITE_2()

{
  
  //*******************QUERFORMAT********************* 
  tft.setRotation(-1);
  
  //*******************HINTERGRUND********************* 
  tft.fillScreen(ILI9341_BLACK);
   
  //*******************ÜBERSCHRIFT********************* 
  tft.setRotation(-1);
  tft.setCursor(85, 0);                              
  tft.setTextColor(ILI9341_RED);
  tft.setTextSize(3);
  tft.print("SEITE 2");
  tft.drawLine(0, 26, 320, 26, ILI9341_GREEN);        // waagerechte Linien


  //**************RECHTECK MIT PFEIL -- VON SEITE 2 ZU SEITE 1 BLÄTTERN************** 
  tft.fillRect(0, 210, 50, 30, ILI9341_WHITE);
  tft.setCursor(3, 218);
  tft.setTextColor(ILI9341_BLACK);
  tft.setTextSize(2);
  tft.print(" <- ");

  while (Seitenzahl == 2)
  {
    //***************************PUSH-BEFEHL -- VON SEITE 2 ZU SEITE 1 BLÄTTERN***************************
    if (ts.touched())
    {   
      TS_Point p = ts.getPoint();
      p.x = map(p.x, 0, 240, 240, 0);
      p.y = map(p.y, 0, 320, 320, 0);
      int x = p.x;
      int y = p.y;
      if( x > 210 && x < 240 && y > 270 && y < 320 && Seitenzahl == 2)
      { 
        Seitenzahl = 1;
        Serial.println("Softbutton: zurück zu Seite 1");
      }
    }
  }
}

That’s the complete error message I get:

Arduino: 1.8.13 (Windows 10), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

In file included from C:\Users\PC Keller\Documents\Arduino\libraries\Adafruit_ImageReader_Library/Adafruit_ImageReader.h:18:0,

                 from C:\Users\PC Keller\Documents\Arduino\pt100_test\laufende_Version\gute_Version_1_test\gute_Version_1_test.ino:29:

C:\Users\PC Keller\Documents\Arduino\libraries\Adafruit_SPIFlash\src/Adafruit_SPIFlash.h:38:2: error: #error ENABLE_EXTENDED_TRANSFER_CLASS must be set to 1 in SdFat SdFatConfig.h

 #error ENABLE_EXTENDED_TRANSFER_CLASS must be set to 1 in SdFat SdFatConfig.h

  ^~~~~

exit status 1

Fehler beim Kompilieren für das Board Arduino Mega or Mega 2560.


In my SdFatConfig.h there is not the same passage as mentioned from you…

Where on your PC is your SdFatConfig.h located ?

It’s in the following folder:

C:\Users\PC Keller\Documents\Arduino\libraries\SdFat-master\src

Which version of SdFat have you got installed ?

/* SdFat version for cpp use. /
#define SD_FAT_VERSION 20006
/* SdFat version as string. /
#define SD_FAT_VERSION_STR “2.0.6”

That’s what I found in the SdFat.h

What version of SdFat does the library manager report as being installed ?

Please post the contents of SdFatConfig.h here in code tags

Hi.

It’s included in the Adafruit ImageReader Library.
From this library i have version 2.6.1 installed (see picture).

This is the code from SdFatConfig.h:

/**
 * Copyright (c) 2011-2020 Bill Greiman
 * This file is part of the SdFat library for SD memory cards.
 *
 * MIT License
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included
 * in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 */
/**
 * \file
 * \brief configuration definitions
 */
#ifndef SdFatConfig_h
#define SdFatConfig_h
#include <stdint.h>
#ifdef __AVR__
#include <avr/io.h>
#endif  // __AVR__
/** For Debug - must be one */
#define ENABLE_ARDUINO_FEATURES 1
/** For Debug - must be one */
#define ENABLE_ARDUINO_SERIAL 1
/** For Debug - must be one */
#define ENABLE_ARDUINO_STRING 1
//------------------------------------------------------------------------------
/** Set zero to disable mod for non-blocking write. */
#define ENABLE_TEENSY_SDIO_MOD 1
//------------------------------------------------------------------------------
/** Set USE_BLOCK_DEVICE_INTERFACE nonzero to use generic block device */
#define USE_BLOCK_DEVICE_INTERFACE 0
//------------------------------------------------------------------------------
#if ENABLE_ARDUINO_FEATURES
#include "Arduino.h"
#ifdef PLATFORM_ID
// Only defined if a Particle device.
#include "application.h"
#endif  // PLATFORM_ID
#endif  // ENABLE_ARDUINO_FEATURES
//------------------------------------------------------------------------------
/**
 * Set INCLUDE_SDIOS nonzero to include sdios.h in SdFat.h.
 * sdios.h provides C++ style IO Streams.
 */
#define INCLUDE_SDIOS 0
//------------------------------------------------------------------------------
/**
 * Set USE_FAT_FILE_FLAG_CONTIGUOUS nonzero to optimize access to
 * contiguous files.
 */
#define USE_FAT_FILE_FLAG_CONTIGUOUS 1
//------------------------------------------------------------------------------
/**
 * File types for SdFat, File, SdFile, SdBaseFile, fstream,
 * ifstream, and ofstream.
 *
 * Set SDFAT_FILE_TYPE to:
 *
 * 1 for FAT16/FAT32, 2 for exFAT, 3 for FAT16/FAT32 and exFAT.
 */
#if defined(__AVR__) && FLASHEND < 0X8000
// 32K AVR boards.
#define SDFAT_FILE_TYPE 1
#elif defined(__arm__)
// ARM boards usually have plenty of memory
#define SDFAT_FILE_TYPE 3
#else  // defined(__AVR__) && FLASHEND < 0X8000
// All other boards.
#define SDFAT_FILE_TYPE 1
#endif  // defined(__AVR__) && FLASHEND < 0X8000
//------------------------------------------------------------------------------
/**
 * Set ENABLE_DEDICATED_SPI non-zero to enable dedicated use of the SPI bus.
 * Selecting dedicated SPI in SdSpiConfig() will produce better
 * performance by using very large multi-block transfers to and
 * from the SD card.
 *
 * Enabling dedicated SPI will cost some extra flash and RAM.
 */
#if defined(__AVR__) && FLASHEND < 0X8000
// 32K AVR boards.
#define ENABLE_DEDICATED_SPI 1
#else  // defined(__AVR__) && FLASHEND < 0X8000
// All other boards.
#define ENABLE_DEDICATED_SPI 1
#endif  // defined(__AVR__) && FLASHEND < 0X8000
//------------------------------------------------------------------------------
/**
 * If the symbol SPI_DRIVER_SELECT is:
 *
 * 0 - An optimized custom SPI driver is used if it exists
 *     else the standard library driver is used.
 *
 * 1 - The standard library driver is always used.
 *
 * 2 - An external SPI driver of SoftSpiDriver template class is always used.
 *
 * 3 - An external SPI driver derived from SdSpiBaseClass is always used.
 */
#define SPI_DRIVER_SELECT 0
/**
 * If USE_SPI_ARRAY_TRANSFER is non-zero and the standard SPI library is
 * use, the array transfer function, transfer(buf, size), will be used.
 * This option will allocate up to a 512 byte temporary buffer for send.
 * This may be faster for some boards.  Do not use this with AVR boards.
 */
#define USE_SPI_ARRAY_TRANSFER 0
//------------------------------------------------------------------------------
/**
 * SD_CHIP_SELECT_MODE defines how the functions
 * void sdCsInit(SdCsPin_t pin) {pinMode(pin, OUTPUT);}
 * and
 * void sdCsWrite(SdCsPin_t pin, bool level) {digitalWrite(pin, level);}
 * are defined.
 *
 * 0 - Internal definition is a strong symbol and can't be replaced.
 *
 * 1 - Internal definition is a weak symbol and can be replaced.
 *
 * 2 - No internal definition and must be defined in the application.
 */
#define SD_CHIP_SELECT_MODE 0
/** Type for card chip select pin. */
typedef uint8_t SdCsPin_t;
//------------------------------------------------------------------------------
/**
 * SD maximum initialization clock rate.
 */
#define SD_MAX_INIT_RATE_KHZ 400
//------------------------------------------------------------------------------
/**
 * Set USE_LONG_FILE_NAMES nonzero to use long file names (LFN) in FAT16/FAT32.
 * exFAT always uses long file names.
 *
 * Long File Name are limited to a maximum length of 255 characters.
 *
 * This implementation allows 7-bit characters in the range
 * 0X20 to 0X7E except the following characters are not allowed:
 *
 *  < (less than)
 *  > (greater than)
 *  : (colon)
 *  " (double quote)
 *  / (forward slash)
 *  \ (backslash)
 *  | (vertical bar or pipe)
 *  ? (question mark)
 *  * (asterisk)
 *
 */
#define USE_LONG_FILE_NAMES 1
//------------------------------------------------------------------------------
/**
 * Set the default file time stamp when a RTC callback is not used.
 * A valid date and time is required by the FAT/exFAT standard.
 *
 * The default below is YYYY-01-01 00:00:00 midnight where YYYY is
 * the compile year from the __DATE__ macro.  This is easy to recognize
 * as a placeholder for a correct date/time.
 *
 * The full compile date is:
 * FS_DATE(compileYear(), compileMonth(), compileDay())
 *
 * The full compile time is:
 * FS_TIME(compileHour(), compileMinute(), compileSecond())
 */
#define FS_DEFAULT_DATE FS_DATE(compileYear(), 1, 1)
/** 00:00:00 midnight */
#define FS_DEFAULT_TIME FS_TIME(0, 0, 0)
//------------------------------------------------------------------------------
/**
 * If CHECK_FLASH_PROGRAMMING is zero, overlap of single sector flash
 * programming and other operations will be allowed for faster write
 * performance.
 *
 * Some cards will not sleep in low power mode unless CHECK_FLASH_PROGRAMMING
 * is non-zero.
 */
#define CHECK_FLASH_PROGRAMMING 0
//------------------------------------------------------------------------------
/**
 * Set MAINTAIN_FREE_CLUSTER_COUNT nonzero to keep the count of free clusters
 * updated.  This will increase the speed of the freeClusterCount() call
 * after the first call.  Extra flash will be required.
 */
#define MAINTAIN_FREE_CLUSTER_COUNT 0
//------------------------------------------------------------------------------
/**
 * To enable SD card CRC checking for SPI, set USE_SD_CRC nonzero.
 *
 * Set USE_SD_CRC to 1 to use a smaller CRC-CCITT function.  This function
 * is slower for AVR but may be fast for ARM and other processors.
 *
 * Set USE_SD_CRC to 2 to used a larger table driven CRC-CCITT function.  This
 * function is faster for AVR but may be slower for ARM and other processors.
 */
#define USE_SD_CRC 0
//------------------------------------------------------------------------------
/** If the symbol USE_FCNTL_H is nonzero, open flags for access modes O_RDONLY,
 * O_WRONLY, O_RDWR and the open modifiers O_APPEND, O_CREAT, O_EXCL, O_SYNC
 * will be defined by including the system file fcntl.h.
 */
#if defined(__AVR__)
// AVR fcntl.h does not define open flags.
#define USE_FCNTL_H 0
#elif defined(PLATFORM_ID)
// Particle boards - use fcntl.h.
#define USE_FCNTL_H 1
#elif defined(__arm__)
// ARM gcc defines open flags.
#define USE_FCNTL_H 1
#elif defined(ESP32)
#define USE_FCNTL_H 1
#else  // defined(__AVR__)
#define USE_FCNTL_H 0
#endif  // defined(__AVR__)
//------------------------------------------------------------------------------
/**
 * Handle Watchdog Timer for WiFi modules.
 *
 * Yield will be called before accessing the SPI bus if it has been more
 * than WDT_YIELD_TIME_MILLIS milliseconds since the last yield call by SdFat.
 */
#if defined(PLATFORM_ID) || defined(ESP8266)
// If Particle device or ESP8266 call yield.
#define WDT_YIELD_TIME_MILLIS 100
#else  // defined(PLATFORM_ID) || defined(ESP8266)
#define WDT_YIELD_TIME_MILLIS 0
#endif  // defined(PLATFORM_ID) || defined(ESP8266)
//------------------------------------------------------------------------------
/**
 * Set FAT12_SUPPORT nonzero to enable use if FAT12 volumes.
 * FAT12 has not been well tested and requires additional flash.
 */
#define FAT12_SUPPORT 1  //DANIEL von 0 auf 1 geändert
//------------------------------------------------------------------------------
/**
 * Set DESTRUCTOR_CLOSES_FILE nonzero to close a file in its destructor.
 *
 * Causes use of lots of heap in ARM.
 */
#define DESTRUCTOR_CLOSES_FILE 0
//------------------------------------------------------------------------------
/**
 * Call flush for endl if ENDL_CALLS_FLUSH is nonzero
 *
 * The standard for iostreams is to call flush.  This is very costly for
 * SdFat.  Each call to flush causes 2048 bytes of I/O to the SD.
 *
 * SdFat has a single 512 byte buffer for SD I/O so it must write the current
 * data sector to the SD, read the directory sector from the SD, update the
 * directory entry, write the directory sector to the SD and read the data
 * sector back into the buffer.
 *
 * The SD flash memory controller is not designed for this many rewrites
 * so performance may be reduced by more than a factor of 100.
 *
 * If ENDL_CALLS_FLUSH is zero, you must call flush and/or close to force
 * all data to be written to the SD.
 */
#define ENDL_CALLS_FLUSH 0
//------------------------------------------------------------------------------
/**
 * Set USE_SIMPLE_LITTLE_ENDIAN nonzero for little endian processors
 * with no memory alignment restrictions.
 */
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ && !defined(__SAMD21G18A__)\
  && !defined(__MKL26Z64__) && !defined(ESP8266)
#define USE_SIMPLE_LITTLE_ENDIAN 1
#else  // __BYTE_ORDER_
#define USE_SIMPLE_LITTLE_ENDIAN 0
#endif  // __BYTE_ORDER_
//------------------------------------------------------------------------------
/**
 * Set USE_SEPARATE_FAT_CACHE nonzero to use a second 512 byte cache
 * for FAT16/FAT32 table entries.  This improves performance for large
 * writes that are not a multiple of 512 bytes.
 */
#ifdef __arm__
#define USE_SEPARATE_FAT_CACHE 1
#else  // __arm__
#define USE_SEPARATE_FAT_CACHE 0
#endif  // __arm__
//------------------------------------------------------------------------------
/**
 * Set USE_EXFAT_BITMAP_CACHE nonzero to use a second 512 byte cache
 * for exFAT bitmap entries.  This improves performance for large
 * writes that are not a multiple of 512 bytes.
 */
#ifdef __arm__
#define USE_EXFAT_BITMAP_CACHE 1
#else  // __arm__
#define USE_EXFAT_BITMAP_CACHE 0
#endif  // __arm__
//------------------------------------------------------------------------------
/**
 * Set USE_MULTI_SECTOR_IO nonzero to use multi-sector SD read/write.
 *
 * Don't use mult-sector read/write on small AVR boards.
 */
#if defined(RAMEND) && RAMEND < 3000
#define USE_MULTI_SECTOR_IO 0
#else  // RAMEND
#define USE_MULTI_SECTOR_IO 1
#endif  // RAMEND
//------------------------------------------------------------------------------
/** Enable SDIO driver if available. */
#if defined(__MK64FX512__) || defined(__MK66FX1M0__)
// Pseudo pin select for SDIO.
#ifndef BUILTIN_SDCARD
#define BUILTIN_SDCARD 254
#endif  // BUILTIN_SDCARD
// SPI for built-in card.
#ifndef SDCARD_SPI
#define SDCARD_SPI      SPI1
#define SDCARD_MISO_PIN 59
#define SDCARD_MOSI_PIN 61
#define SDCARD_SCK_PIN  60
#define SDCARD_SS_PIN   62
#endif  // SDCARD_SPI
#define HAS_SDIO_CLASS 1
#endif  // defined(__MK64FX512__) || defined(__MK66FX1M0__)
#if defined(__IMXRT1062__)
#define HAS_SDIO_CLASS 1
#endif  // defined(__IMXRT1062__)
//------------------------------------------------------------------------------
/**
 * Determine the default SPI configuration.
 */
#if defined(ARDUINO_ARCH_APOLLO3)\
  || defined(__AVR__)\
  || defined(ESP8266) || defined(ESP32)\
  || defined(PLATFORM_ID)\
  || defined(ARDUINO_SAM_DUE)\
  || defined(__STM32F1__) || defined(__STM32F4__)\
  || (defined(CORE_TEENSY) && defined(__arm__))
#define SD_HAS_CUSTOM_SPI 1
#else  // SD_HAS_CUSTOM_SPI
// Use standard SPI library.
#define SD_HAS_CUSTOM_SPI 0
#endif  // SD_HAS_CUSTOM_SPI
//------------------------------------------------------------------------------
#ifndef HAS_SDIO_CLASS
/** Default is no SDIO. */
#define HAS_SDIO_CLASS 0
#endif  // HAS_SDIO_CLASS
#endif  // SdFatConfig_h

Regards
DANIEL

Do you have the stand alone SdFat library installed ?

Yes, this lib is also installed, but Version 2.0.6

The moral of the story is : Use the Library Manager.

C:\Users\PC Keller\Documents\Arduino\libraries\SdFat-master\src is in the right place but you have manually installed from a GitHub ZIP.

Delete any of these “incorrect” libraries.
Then install properly via the Library Manager.
You will be able to downgrade / upgrade versions whenever you want. The Manager will ensure that you have a single version at any one time.

David.

Hi everybody.

Sorry for my late response.
I deleted all self installed libraries from "...Documents\Arduino\libraries..." and installed the following new libraries via the library Manager:

libraries

Compiling my code looks now much better, but I got the following error messages:

In file included from C:\Users\PC Keller\Documents\Arduino\libraries\Adafruit_ImageReader_Library/Adafruit_ImageReader.h:18:0,
                 from C:\Users\PC Keller\Documents\Arduino\pt100_test\laufende_Version\gute_Version_1_test\gute_Version_1_test.ino:29:
C:\Users\PC Keller\Documents\Arduino\libraries\Adafruit_SPIFlash\src/Adafruit_SPIFlash.h:50:49: error: expected class-name before ',' token
 class Adafruit_SPIFlash : public BaseBlockDriver, public Adafruit_SPIFlashBase {
                                                 ^
In file included from C:\Users\PC Keller\Documents\Arduino\pt100_test\laufende_Version\gute_Version_1_test\gute_Version_1_test.ino:29:0:
C:\Users\PC Keller\Documents\Arduino\libraries\Adafruit_ImageReader_Library/Adafruit_ImageReader.h:97:38: error: expected ')' before '&' token
   Adafruit_ImageReader(FatFileSystem &fs);
                                      ^
C:\Users\PC Keller\Documents\Arduino\libraries\Adafruit_ImageReader_Library/Adafruit_ImageReader.h:106:3: error: 'FatFileSystem' does not name a type; did you mean 'SDFileSystem'?
   FatFileSystem *filesys; ///< FAT FileSystem Object
   ^~~~~~~~~~~~~
   SDFileSystem
exit status 1
Fehler beim Kompilieren für das Board Arduino Mega or Mega 2560.

This is my code:

/**********************FARBEN************************** 
ILI9341_BLACK               0x0000 ///<   0,   0,   0
ILI9341_NAVY                0x000F ///<   0,   0, 123
ILI9341_DARKGREEN           0x03E0 ///<   0, 125,   0
ILI9341_DARKCYAN            0x03EF ///<   0, 125, 123
ILI9341_MAROON              0x7800 ///< 123,   0,   0
ILI9341_PURPLE              0x780F ///< 123,   0, 123
ILI9341_OLIVE               0x7BE0 ///< 123, 125,   0
ILI9341_LIGHTGREY           0xC618 ///< 198, 195, 198
ILI9341_DARKGREY            0x7BEF ///< 123, 125, 123
ILI9341_BLUE                0x001F ///<   0,   0, 255
ILI9341_GREEN               0x07E0 ///<   0, 255,   0
ILI9341_CYAN                0x07FF ///<   0, 255, 255
ILI9341_RED                 0xF800 ///< 255,   0,   0
ILI9341_MAGENTA             0xF81F ///< 255,   0, 255
ILI9341_YELLOW              0xFFE0 ///< 255, 255,   0
ILI9341_WHITE               0xFFFF ///< 255, 255, 255
ILI9341_ORANGE              0xFD20 ///< 255, 165,   0
ILI9341_GREENYELLOW         0xAFE5 ///< 173, 255,  41
ILI9341_PINK                0xFC18 ///< 255, 130, 198
*/

#include "SPI.h"
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9341.h"
#include "Wire.h"                                           // this is needed for FT6206
#include "Adafruit_FT6206.h"
#include "SD.h"
#include "Adafruit_ImageReader.h"                           // Image-reading functions


#define TFT_DC  9
#define TFT_CS 10
#define SD_CS 4


Adafruit_ILI9341  tft   = Adafruit_ILI9341(TFT_CS, TFT_DC);
Adafruit_FT6206   ctp   = Adafruit_FT6206();                  // The FT6206 uses hardware I2C (SCL/SDA)
Adafruit_FT6206   ts    = Adafruit_FT6206();

int ThermistorPin08 = 8;              // Analogsignal Sensor Öl Vorlauf   an Pin Analog_In 08
int ThermistorPin09 = 9;              // Analogsignal Sensor Öl Rücklauf  an Pin Analog_In 09
int ThermistorPin10 = 10;             // Analogsignal Sensor Zylinder 1   an Pin Analog_In 10
int ThermistorPin11 = 11;             // Analogsignal Sensor Zylinder 2   an Pin Analog_In 11
int ThermistorPin12 = 12;             // Analogsignal Sensor Zylinder 3   an Pin Analog_In 12
int ThermistorPin13 = 13;             // Analogsignal Sensor Zylinder 4   an Pin Analog_In 13
int Vo;
int Seitenzahl;
int Zyl_1, Zyl_2, Zyl_3, Zyl_4, Oil_in, Oil_out, Zyl_1_old, Zyl_2_old, Zyl_3_old, Zyl_4_old, Oil_in_old, Oil_out_old;

bool T_Zyl_1_Fail, T_Zyl_2_Fail, T_Zyl_3_Fail, T_Zyl_4_Fail, T_Oil_in_Fail, T_Oil_out_Fail, Global_Fail;

float R1 = 10000;
float logR2, R2, T, T_Zyl_1, T_Zyl_2, T_Zyl_3, T_Zyl_4, T_Oil_in, T_Oil_out;
float c1 = 1.009249522e-03, c2 = 2.378405444e-04, c3 = 2.019202697e-07;

void setup() {
  Serial.begin(9600);
  tft.begin();
  ts.begin();
  Seitenzahl = 0;
  
  //*******************QUERFORMAT********************* 
  tft.setRotation(-1);
  
  //*******************HINTERGRUND********************* 
  tft.fillScreen(ILI9341_BLACK);

  //*******************ÜBERSCHRIFT********************* 
  tft.setCursor(60, 100);                              
  tft.setTextColor(ILI9341_WHITE);
  tft.setTextSize(4);
  tft.print("VW KÄFER");

}

//****************************************************************************************

void loop()
{

while (Seitenzahl == 0)
{
  SEITE_BITMAP();
}

while (Seitenzahl == 1)
{
  SEITE_TEMPERATUREN();
}

while (Seitenzahl == 2)
{
  SEITE_2();
}
}


//****************************************************************************************
//******************************   S E I T E   0   ***************************************
//****************************************************************************************

void SEITE_BITMAP()

{
  //***************SPRUNG ZU SEITE 1*********************
  if (ts.touched())
  {   
    Seitenzahl = 1;
  }

}

//****************************************************************************************
//******************************   S E I T E   1   ***************************************
//****************************************************************************************

void SEITE_TEMPERATUREN()
{

  //*******************QUERFORMAT********************* 
  tft.setRotation(-1);
  
  //*******************HINTERGRUND********************* 
  tft.fillScreen(ILI9341_BLACK);

  
  //*******************LINIEN************************** //Linie: tft.drawLine(x1, y1, x2, y2, color);
  tft.drawLine(0, 26, 320, 26, ILI9341_GREEN);        // waagerechte Linien
  tft.drawLine(0, 133, 320, 133, ILI9341_GREEN);        
  tft.drawLine(77, 26, 77, 240, ILI9341_GREEN);       // senkrechte Linien
  tft.drawLine(159, 26, 159, 240, ILI9341_GREEN);
  tft.drawLine(241, 26, 241, 133, ILI9341_GREEN);
  
  //*******************ÜBERSCHRIFT********************* 
  tft.setCursor(50, 0);                              
  tft.setTextColor(ILI9341_BLUE);
  tft.setTextSize(3);
  tft.print("TEMPERATUREN");

  //**************EINHEITEN & BEZEICHNUNGEN************** 
  tft.setCursor(3, 137);                                // Bezeichnung Öl Vorlauf
  tft.setTextColor(ILI9341_WHITE);
  tft.setTextSize(2);
  tft.print("Oil");
  tft.setTextSize(1);
  tft.print(" ");
  tft.setTextSize(2);
  tft.print("in");

  tft.setCursor(81, 137);                                // Bezeichnung Öl Rücklauf
  tft.setTextColor(ILI9341_WHITE);
  tft.setTextSize(2);
  tft.print("Oil");
  tft.setTextSize(1);
  tft.print(" ");
  tft.setTextSize(2);
  tft.print("out");
  
  tft.setCursor(6, 30);                                // Bezeichnung Zylinder 1
  tft.setTextColor(ILI9341_WHITE);
  tft.setTextSize(2);
  tft.print("Zyl 1");

  tft.setCursor(88, 30);                               // Bezeichnung Zylinder 2
  tft.setTextColor(ILI9341_WHITE);
  tft.setTextSize(2);
  tft.print("Zyl 2");

  tft.setCursor(170, 30);                              // Bezeichnung Zylinder 3
  tft.setTextColor(ILI9341_WHITE);
  tft.setTextSize(2);
  tft.print("Zyl 3");

  tft.setCursor(252, 30);                              // Bezeichnung Zylinder 4
  tft.setTextColor(ILI9341_WHITE);
  tft.setTextSize(2);
  tft.print("Zyl 4");


  tft.setCursor(19, 70);
  tft.setTextColor(ILI9341_GREEN);
  tft.setTextSize(2);
  tft.print(Zyl_1);
  tft.setTextSize(1);
  tft.print(" C");

  tft.setCursor(101, 70);
  tft.setTextColor(ILI9341_GREEN);
  tft.setTextSize(2);
  tft.print(Zyl_2);
  tft.setTextSize(1);
  tft.print(" C");

  tft.setCursor(183, 70);
  tft.setTextColor(ILI9341_GREEN);
  tft.setTextSize(2);
  tft.print(Zyl_3);
  tft.setTextSize(1);
  tft.print(" C");

  tft.setCursor(265, 70);
  tft.setTextColor(ILI9341_GREEN);
  tft.setTextSize(2);
  tft.print(Zyl_4);
  tft.setTextSize(1);
  tft.print(" C");

  tft.setCursor(19, 180);
  tft.setTextColor(ILI9341_GREEN);
  tft.setTextSize(2);
  tft.print(Oil_in);
  tft.setTextSize(1);
  tft.print(" C");

  tft.setCursor(101, 180);  
  tft.setTextColor(ILI9341_GREEN);
  tft.setTextSize(2);
  tft.print(Oil_out);
  tft.setTextSize(1);
  tft.print(" C");

  //**************RECHTECK MIT PFEIL -- VON SEITE 1 ZU SEITE 2 BLÄTTERN************** 

  tft.fillRect(269, 210, 50, 30, ILI9341_WHITE);
  tft.setCursor(272, 218);
  tft.setTextColor(ILI9341_BLACK);
  tft.setTextSize(2);
  tft.print(" -> ");

  while (Seitenzahl == 1)
  {

    // Zylinder_1
    Vo = analogRead(ThermistorPin10);
    R2 = R1 * (1023.0 / (float)Vo - 1.0);
    logR2 = log(R2);
    T = (1.0 / (c1 + c2*logR2 + c3*logR2*logR2*logR2));
    T_Zyl_1 = T - 273.15;
    if (T_Zyl_1 == -273.15)                                     //  Überprüfung Sensor - defekter oder nicht angeschlossener Sensor gibt "-273,15" aus
    {
      (T_Zyl_1_Fail = 1);
    }
    if (T_Zyl_1 != -273.15)
    {
      (T_Zyl_1_Fail = 0);
    }
    Zyl_1 = T_Zyl_1;                                         // float to integer
  
    // Zylinder_2
    Vo = analogRead(ThermistorPin11);
    R2 = R1 * (1023.0 / (float)Vo - 1.0);
    logR2 = log(R2);
    T = (1.0 / (c1 + c2*logR2 + c3*logR2*logR2*logR2));
    T_Zyl_2 = T - 273.15;
    if (T_Zyl_2 == -273.15)                                     //  Überprüfung Sensor - defekter oder nicht angeschlossener Sensor gibt "-273,15" aus
    {
      (T_Zyl_2_Fail = 1);
    }
    if (T_Zyl_2 != -273.15)
    {
      (T_Zyl_2_Fail = 0);
    }
    Zyl_2 = T_Zyl_2;                                         // float to integer

    // Zylinder_3
    Vo = analogRead(ThermistorPin12);
    R2 = R1 * (1023.0 / (float)Vo - 1.0);
    logR2 = log(R2);
    T = (1.0 / (c1 + c2*logR2 + c3*logR2*logR2*logR2));
    T_Zyl_3 = T - 273.15;
    if (T_Zyl_3 == -273.15)                                     //  Überprüfung Sensor - defekter oder nicht angeschlossener Sensor gibt "-273,15" aus
    {
      (T_Zyl_3_Fail = 1);
    }
    if (T_Zyl_3 != -273.15)
    {
      (T_Zyl_3_Fail = 0);
    }
    Zyl_3 = T_Zyl_3;                                         // float to integer

    // Zylinder_4
    Vo = analogRead(ThermistorPin13);
    R2 = R1 * (1023.0 / (float)Vo - 1.0);
    logR2 = log(R2);
    T = (1.0 / (c1 + c2*logR2 + c3*logR2*logR2*logR2));
    T_Zyl_4 = T - 273.15;
    if (T_Zyl_4 == -273.15)                                     //  Überprüfung Sensor - defekter oder nicht angeschlossener Sensor gibt "-273,15" aus
    {
      (T_Zyl_4_Fail = 1);
    }
    if (T_Zyl_4 != -273.15)
    {
      (T_Zyl_4_Fail = 0);
    }
    Zyl_4 = T_Zyl_4;                                         // float to integer

    // Öl Vorlauf
    Vo = analogRead(ThermistorPin08);
    R2 = R1 * (1023.0 / (float)Vo - 1.0);
    logR2 = log(R2);
    T = (1.0 / (c1 + c2*logR2 + c3*logR2*logR2*logR2));
    T_Oil_in = T - 273.15;
    if (T_Oil_in == -273.15)                                     //  Überprüfung Sensor - defekter oder nicht angeschlossener Sensor gibt "-273,15" aus
    {
      (T_Oil_in_Fail = 1);
    }
    if (T_Oil_in != -273.15)
    {
      (T_Oil_in_Fail = 0);
    }
    Oil_in = T_Oil_in;                                         // float to integer

    // Öl Rücklauf
    Vo = analogRead(ThermistorPin09);
    R2 = R1 * (1023.0 / (float)Vo - 1.0);
    logR2 = log(R2);
    T = (1.0 / (c1 + c2*logR2 + c3*logR2*logR2*logR2));
    T_Oil_out = T - 273.15;
    if (T_Oil_out == -273.15)                                     //  Überprüfung Sensor - defekter oder nicht angeschlossener Sensor gibt "-273,15" aus
    {
      (T_Oil_out_Fail = 1);
    }
    if (T_Oil_out != -273.15)
    {
      (T_Oil_out_Fail = 0);
    }
    Oil_out = T_Oil_out;                                         // float to integer


    // SAMMELSTÖRUNG
    Global_Fail = T_Zyl_1_Fail or T_Zyl_2_Fail or T_Zyl_3_Fail or T_Zyl_4_Fail or T_Oil_in_Fail or T_Oil_out_Fail;
  

    //*******************SERIELLER MONITOR************************** 

    Serial.print("Zylinder 1: ");
    Serial.print(T_Zyl_1);
    Serial.print("°C   ");
    Serial.print("Zylinder 2: ");
    Serial.print(T_Zyl_2);
    Serial.print("°C   ");
    Serial.print("Zylinder 3: ");
    Serial.print(T_Zyl_3);
    Serial.print("°C   ");
    Serial.print("Zylinder 4: ");
    Serial.print(T_Zyl_4);
    Serial.print("°C   ");
    Serial.print("Öl Vorlauf: ");
    Serial.print(T_Oil_in);
    Serial.print("°C   ");
    Serial.print("Öl Rücklauf: ");
    Serial.print(T_Oil_out);
    Serial.println("°C");
    delay(500);

    //*******************WERTE UND TEXTE**ZYLINDER  1***************

    if (T_Zyl_1 == -273.15)                                 // Ausfall Sensor Zylinder 1
    {
      tft.fillRect(0, 70, 77, 15, ILI9341_BLACK);           // Messwert mit schwarzem Rechteck überschreiben
      tft.setCursor(0, 70);
      tft.setTextColor(ILI9341_GREEN);
      tft.setTextSize(2);
      tft.print(" -----");
    }
    
    if (Zyl_1_old != Zyl_1)                              // Temperatur Zylinder 1
    {
      tft.fillRect(0, 70, 77, 15, ILI9341_BLACK);           // Messwert mit schwarzem Rechteck überschreiben
      tft.setCursor(19, 70);
      tft.setTextColor(ILI9341_GREEN);
      tft.setTextSize(2);
      tft.print(Zyl_1);
      tft.setTextSize(1);
      tft.print(" C");
      Zyl_1_old = Zyl_1;
    }

    //*******************WERTE UND TEXTE**ZYLINDER  2***************

    if (T_Zyl_2 == -273.15)                                 // Ausfall Sensor Zylinder 1
    {
      tft.fillRect(82, 70, 77, 15, ILI9341_BLACK);           // Messwert mit schwarzem Rechteck überschreiben
      tft.setCursor(82, 70);
      tft.setTextColor(ILI9341_GREEN);
      tft.setTextSize(2);
      tft.print(" -----");
    }

    if (Zyl_2_old != Zyl_2)                                   // Temperatur Zylinder 2
    {
      tft.fillRect(82, 70, 77, 15, ILI9341_BLACK);           // Messwert mit schwarzem Rechteck überschreiben
      tft.setCursor(101, 70);
      tft.setTextColor(ILI9341_GREEN);
      tft.setTextSize(2);
      tft.print(Zyl_2);
      tft.setTextSize(1);
      tft.print(" C");
      Zyl_2_old = Zyl_2;
    }

    //*******************WERTE UND TEXTE**ZYLINDER  3***************

    if (T_Zyl_3 == -273.15)                                 // Ausfall Sensor Zylinder 3
    {
      tft.fillRect(164, 70, 77, 15, ILI9341_BLACK);           // Messwert mit schwarzem Rechteck überschreiben
      tft.setCursor(164, 70);
      tft.setTextColor(ILI9341_GREEN);
      tft.setTextSize(2);
      tft.print(" -----");
    }

    if (Zyl_3_old != Zyl_3)                              // Temperatur Zylinder 3
    {
      tft.fillRect(164, 70, 77, 15, ILI9341_BLACK);           // Messwert mit schwarzem Rechteck überschreiben
      tft.setCursor(183, 70);
      tft.setTextColor(ILI9341_GREEN);
      tft.setTextSize(2);
      tft.print(Zyl_3);
      tft.setTextSize(1);
      tft.print(" C");
      Zyl_3_old = Zyl_3;
    }

    //*******************WERTE UND TEXTE**ZYLINDER  4***************

    if (T_Zyl_4 == -273.15)                                 // Ausfall Sensor Zylinder 4
    {
      tft.fillRect(246, 70, 77, 15, ILI9341_BLACK);           // Messwert mit schwarzem Rechteck überschreiben
      tft.setCursor(246, 70);
      tft.setTextColor(ILI9341_GREEN);
      tft.setTextSize(2);
      tft.print(" -----");
    }
 
    if (Zyl_4_old != Zyl_4)                              // Temperatur Zylinder 4
    {
      tft.fillRect(246, 70, 77, 15, ILI9341_BLACK);           // Messwert mit schwarzem Rechteck überschreiben
      tft.setCursor(265, 70);
      tft.setTextColor(ILI9341_GREEN);
      tft.setTextSize(2);
      tft.print(Zyl_4);
      tft.setTextSize(1);
      tft.print(" C");
      Zyl_4_old = Zyl_4;
    }
  
    //*******************WERTE UND TEXTE**ÖL  VORLAUF***************

    if (T_Oil_in == -273.15)                                 // Ausfall Sensor Öl Vorlauf
    {
      tft.fillRect(0, 180, 77, 15, ILI9341_BLACK);           // Messwert mit schwarzem Rechteck überschreiben
      tft.setCursor(0, 180);
      tft.setTextColor(ILI9341_GREEN);
      tft.setTextSize(2);
      tft.print(" -----");
    }

    if (Oil_in_old != Oil_in)                                 // Temperatur Öl Vorlauf
    {
      tft.fillRect(0, 180, 77, 15, ILI9341_BLACK);           // Messwert mit schwarzem Rechteck überschreiben
      tft.setCursor(19, 180);
      tft.setTextColor(ILI9341_GREEN);
      tft.setTextSize(2);
      tft.print(Oil_in);
      tft.setTextSize(1);
      tft.print(" C");
      Oil_in_old = Oil_in;
    }

    //*******************WERTE UND TEXTE**ÖL  RÜCKLAUF***************

    if (T_Oil_out == -273.15)                                 // Ausfall Sensor Öl Rücklauf
    {
      tft.fillRect(82, 180, 77, 15, ILI9341_BLACK);           // Messwert mit schwarzem Rechteck überschreiben
      tft.setCursor(82, 180);
      tft.setTextColor(ILI9341_GREEN);
      tft.setTextSize(2);
      tft.print(" -----");
    }

    if (Oil_out_old != Oil_out)                              // Temperatur Öl Rücklauf
    {
      tft.fillRect(82, 180, 77, 15, ILI9341_BLACK);           // Messwert mit schwarzem Rechteck überschreiben
      tft.setCursor(101, 180);
      tft.setTextColor(ILI9341_GREEN);
      tft.setTextSize(2);
      tft.print(Oil_out);
      tft.setTextSize(1);
      tft.print(" C");
      Oil_out_old = Oil_out;
    }

    //*******************WERTE UND TEXTE**SAMMELSTÖRUNG***************

    if (Global_Fail == 1)                                         // Event Sammelstörung
    {
      tft.fillRect(229, 170, 61, 40, ILI9341_RED);                // Rotes Quadrat rechts unten in der Ecke
      tft.setCursor(230, 185);
      tft.setTextColor(ILI9341_WHITE);
      tft.setTextSize(2);
      tft.print("ALARM");
    }

    if (Global_Fail == 0)                                         // Event Sammelstörung
    {
      tft.fillRect(229, 170, 61, 40, ILI9341_BLACK);              // Rotes Quadrat rechts unten in der Ecke überschreiben
    }

    //***************************PUSH-BEFEHL -- VON SEITE 1 ZU SEITE 2 BLÄTTERN***************************

    if (ts.touched())
    {   
      TS_Point p = ts.getPoint();
      p.x = map(p.x, 0, 240, 240, 0);
      p.y = map(p.y, 0, 320, 320, 0);
      int x = p.x;
      int y = p.y;
      if( x > 210 && x < 240 && y > 0 && y < 50 && Seitenzahl == 1)
      {
        Seitenzahl = 2;
        Serial.println("Softbutton: vor zu Seite 2");
      }
    }

  }
}
//****************************************************************************************
//******************************   S E I T E   2   ***************************************
//****************************************************************************************

void SEITE_2()

{  
  //*******************QUERFORMAT********************* 
  tft.setRotation(-1);
  
  //*******************HINTERGRUND********************* 
  tft.fillScreen(ILI9341_BLACK);
   
  //*******************ÜBERSCHRIFT********************* 
  tft.setRotation(-1);
  tft.setCursor(85, 0);                              
  tft.setTextColor(ILI9341_RED);
  tft.setTextSize(3);
  tft.print("DREHZAHL");
  tft.drawLine(0, 26, 320, 26, ILI9341_GREEN);        // waagerechte Linien


  //**************RECHTECK MIT PFEIL -- VON SEITE 2 ZU SEITE 1 BLÄTTERN************** 
  tft.fillRect(0, 210, 50, 30, ILI9341_WHITE);
  tft.setCursor(3, 218);
  tft.setTextColor(ILI9341_BLACK);
  tft.setTextSize(2);
  tft.print(" <- ");

  while (Seitenzahl == 2)
  {
    //***************************PUSH-BEFEHL -- VON SEITE 2 ZU SEITE 1 BLÄTTERN***************************
    if (ts.touched())
    {   
      TS_Point p = ts.getPoint();
      p.x = map(p.x, 0, 240, 240, 0);
      p.y = map(p.y, 0, 320, 320, 0);
      int x = p.x;
      int y = p.y;
      if( x > 210 && x < 240 && y > 270 && y < 320 && Seitenzahl == 2)
      { 
        Seitenzahl = 1;
        Serial.println("Softbutton: zurück zu Seite 1");
      }
    }
  }
}

Hello everybody.

No feedback on my last post?

DANIEL

You have included several library headers that you don't actually use.

#include "SPI.h"
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9341.h"
#include "Wire.h"                                           // this is needed for FT6206
#include "Adafruit_FT6206.h"
//#include "SD.h"
//#include "Adafruit_ImageReader.h"                           // Image-reading functions

If you avoid the "Adafruit_ImageReader.h" and "SD.h" it compiles ok.

If you install "Adafruit_ImageReader.h" it drags in several other Adafruit libraries. Which cause the compile problems.

I suggest that you only include what libraries you actually use.

If you subsequently want to use "Adafruit_ImageReader.h", I suggest that you run all the Adafruit_ImageReader library examples first.
I would expect Adafruit to ensure the examples work 100%.

When "Adafruit_ImageReader" is fully operational, you can attempt to use in your project,

Adafruit are criminal for dragging in other libraries. Which generally means failure on unusual platforms.

David.

I call it usurpation. Adafruit usurpates the whole Arduino IDE environment, if you #include any of their libraries. It forces addition of all their libraries on you.

Of course, this is an exaggeration. But it is the feeling I get. Jean-Marc.

I suggest you use the ILI9341_due library, you can manage images from a microSD using the SdFat library, even the SdFat beta works.

Thank you guys.

If I got you right, I should prevent from using Adafruit libraries in general?

@ TFTLCDCyg: Can you send me a complete example project?

No, that's not my opinion. In general, I think Adafruit libraries are excellent. But the structure of their libraries dependencies is a horror. It started when they added Adafruit_SPITFT to Adafruit_GFX, instead of creating a separate library. Planting a tree upside down is not a good idea!

Jean-Marc

I agree 100% with Jean-Marc. Adafruit libraries are excellent.
But the structure of their libraries dependencies is a horror.

Your specific project does not use "Adafruit_ImageReader.h". So don't #include it.

@ TFTLCDCyg,

Your photo looks like a parallel TFT Shield plugged into a MEGA2560. ILI9341_due library works on SPI interface. You only get the dramatic performance on an Arduino Due.

David.