Frage zur bedingten Compilierung (#ifdef) ...

Hallo paulinchen,

ich mache das auch so und es funktioniert. Hier der entsprechende Teil aus einem Code

#define I2CDISPLAY

#define MAXLINES 4    // defines the number of display lines
#define LCD_CHARACTERS 20

#ifdef I2CDISPLAY
#include <Wire.h> 
#include <LiquidCrystal_I2C.h>
#define LCD_ADRESS 0x27
LiquidCrystal_I2C lcd(LCD_ADRESS,LCD_CHARACTERS,MAXLINES);  // I2C LCD address is 0x27
#else
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);  // RS, E, D4, D5, D6, D7 - the standard connection
#endif

Fehlt bei dir eventuell ein
#define I2C_LCD_Vorhanden
?

Gruß Reinhard