Sketch wird auf dem LCD nicht richtig angezeigt

Hallo zusammen,
Zunächst freut es mich sehr, dass ich nun auch ein Teil der Arduinocommunity bin.
Ich hab in den letzten Wochen ausführlich mit dieser Thematik auseinander gesetzt und hab sehr viel von euch lernen können. Dafür danke ich euch sehr.
Nun hab ich folgenden Sketch mir zusammengebaut. Leider bekomme ich den nicht richtig auf dem LCD angezeigt. Hat jemand eine Idee?
Ich danke euch jetzt schon für eure Mühen!
Display

/* VERSUCH */
#include "LiquidCrystal_I2C.h"
LiquidCrystal_I2C lcd(0x27,20,4);


#define ROOT_MENU_CNT  3
#define SUB_MENU1_CNT  4
#define SUB_MENU2_CNT  5
#define SUB_MENU3_CNT  2

// setup the emum with all the menu pages options
enum pageType {ROOT_MENU, SUB_MENU1, SUB_MENU2, SUB_MENU3};

// holds which page is currently selected
enum pageType currPage = ROOT_MENU;

// selected item pointer for the root menu
uint8_t root_Pos = 1;

// constants holding port addresses
const int BTN_ACCEPT = A0;
const int BTN_UP = A2;
const int BTN_DOWN = A1;
const int BTN_CANCEL = A3;

// =======================================================================================
// ||                                    SETUP                                          ||
// =======================================================================================
void setup() {

  lcd.init();
  lcd.backlight();

  // init the serial port to be used as a display return
  //Serial.begin(115200);

  // setup the basic I/O's
  pinMode(BTN_ACCEPT, INPUT_PULLUP);
  pinMode(BTN_UP, INPUT_PULLUP);
  pinMode(BTN_DOWN, INPUT_PULLUP);
  pinMode(BTN_CANCEL, INPUT_PULLUP);
  
}


// =======================================================================================
// ||                                  MAIN LOOP                                        ||
// =======================================================================================
void loop() {

  switch (currPage){
    case ROOT_MENU:     page_RootMenu(); break;
    case SUB_MENU1:     page_SubMenu1(); break;
    case SUB_MENU2:     page_SubMenu2(); break;
    case SUB_MENU3:     page_SubMenu3(); break;
  }

}

// =======================================================================================
// ||                               PAGE - ROOT MENU                                    ||
// =======================================================================================
void page_RootMenu(void) {

  //flag for updating the display
  boolean updateDisplay = true;
  
  // tracks when entered top of loop
  uint32_t loopStartMs;

  //tracks button states
  boolean btn_Up_WasDown = false;
  boolean btn_Down_WasDown = false;
  boolean btn_Accept_WasDown = false;
  
  //inner loop
  while (true){

    // capture start time
    loopStartMs = millis();

    // print the display
    if (updateDisplay){
      
      // clear the update flag
      updateDisplay = false;

      //clear the display
      clearScreen();

      //menu title
      lcd.println(F("Verwaltung"));

      //print a divider line
      printDivider();

      // print the items
      printSelected(1, root_Pos); lcd.println(F("Innen"));
      printSelected(2, root_Pos); lcd.println(F("Außen"));
      printSelected(3, root_Pos); lcd.println(F("Einstellungen"));
      lcd.println();
      lcd.println();
      
      //print a divider line
      printDivider();
      
    }

    // capture the button down states
    if (btnIsDown(BTN_UP)) {btn_Up_WasDown = true;}
    if (btnIsDown(BTN_DOWN)) {btn_Down_WasDown = true;}
    if (btnIsDown(BTN_ACCEPT)) {btn_Accept_WasDown = true;}

    //move the pointer down
    if (btn_Down_WasDown && btnIsUp(BTN_DOWN)){
      if (root_Pos == ROOT_MENU_CNT) {root_Pos = 1;} else {root_Pos++;}
      updateDisplay = true;
      btn_Down_WasDown = false;
    }

    //move the pointer Up
    if (btn_Up_WasDown && btnIsUp(BTN_UP)){
      if (root_Pos == 1) {root_Pos = ROOT_MENU_CNT;} else {root_Pos--;}
      updateDisplay = true;
      btn_Up_WasDown = false;
    }

    //move to the selected page
    if (btn_Accept_WasDown && btnIsUp(BTN_ACCEPT)){
      switch (root_Pos) {
        case 1: currPage = SUB_MENU1; return;
        case 2: currPage = SUB_MENU2; return;
        case 3: currPage = SUB_MENU3; return;
      }
    }
 
    // keep a specific pace
    while (millis() - loopStartMs < 25) {delay(2);}
    
  }
  
}


// =======================================================================================
// ||                               PAGE - SUB MENU1                                    ||
// =======================================================================================
void page_SubMenu1(void) {
  
  //flag for updating the display
  boolean updateDisplay = true;
  
  // tracks when entered top of loop
  uint32_t loopStartMs;

  //tracks button states
  boolean btn_Up_WasDown = false;
  boolean btn_Down_WasDown = false;
  boolean btn_Cancel_WasDown = false;
  
  // selected item pointer
  uint8_t sub_Pos = 1;

  //inner loop
  while (true){

    // capture start time
    loopStartMs = millis();

    // print the display
    if (updateDisplay){
      
      // clear the update flag
      updateDisplay = false;

      //clear the display
      clearScreen();

      //menu title
      lcd.println(F("[ SUB MENU #1 ]"));

      //print a divider line
      printDivider();

      // print the items
      printSelected(1, sub_Pos); lcd.println(F("The First Item"));
      printSelected(2, sub_Pos); lcd.println(F("The Second Item"));
      printSelected(3, sub_Pos); lcd.println(F("The Third Item"));
      printSelected(4, sub_Pos); lcd.println(F("The Forth Item"));
      lcd.println();
      
      //print a divider line
      printDivider();
      
    }

    // capture the button down states
    if (btnIsDown(BTN_UP)) {btn_Up_WasDown = true;}
    if (btnIsDown(BTN_DOWN)) {btn_Down_WasDown = true;}
    if (btnIsDown(BTN_CANCEL)) {btn_Cancel_WasDown = true;}

    //move the pointer down
    if (btn_Down_WasDown && btnIsUp(BTN_DOWN)){
      if (sub_Pos == SUB_MENU1_CNT) {sub_Pos = 1;} else {sub_Pos++;}
      updateDisplay = true;
      btn_Down_WasDown = false;
    }

    //move the pointer Up
    if (btn_Up_WasDown && btnIsUp(BTN_UP)){
      if (sub_Pos == 1) {sub_Pos = SUB_MENU1_CNT;} else {sub_Pos--;}
      updateDisplay = true;
      btn_Up_WasDown = false;
    }

    //move to the go to the root menu
    if (btn_Cancel_WasDown && btnIsUp(BTN_CANCEL)){currPage = ROOT_MENU; return;}

    // keep a specific pace
    while (millis() - loopStartMs < 25) {delay(2);}
    
  }
  
}


// =======================================================================================
// ||                               PAGE - SUB MENU2                                    ||
// =======================================================================================
void page_SubMenu2(void) {
  
  //flag for updating the display
  boolean updateDisplay = true;
  
  // tracks when entered top of loop
  uint32_t loopStartMs;

  //tracks button states
  boolean btn_Up_WasDown = false;
  boolean btn_Down_WasDown = false;
  boolean btn_Cancel_WasDown = false;
  
  // selected item pointer
  uint8_t sub_Pos = 1;

  //inner loop
  while (true){

    // capture start time
    loopStartMs = millis();

    // print the display
    if (updateDisplay){
      
      // clear the update flag
      updateDisplay = false;

      //clear the display
      clearScreen();

      //menu title
      lcd.println(F("[ SUB MENU #2 ]"));

      //print a divider line
      printDivider();

      // print the items
      printSelected(1, sub_Pos); lcd.println(F("The First Item"));
      printSelected(2, sub_Pos); lcd.println(F("The Second Item"));
      printSelected(3, sub_Pos); lcd.println(F("The Third Item"));
      printSelected(4, sub_Pos); lcd.println(F("The Forth Item"));
      printSelected(5, sub_Pos); lcd.println(F("The Fifth Item"));
      
      //print a divider line
      printDivider();
      
    }

    // capture the button down states
    if (btnIsDown(BTN_UP)) {btn_Up_WasDown = true;}
    if (btnIsDown(BTN_DOWN)) {btn_Down_WasDown = true;}
    if (btnIsDown(BTN_CANCEL)) {btn_Cancel_WasDown = true;}

    //move the pointer down
    if (btn_Down_WasDown && btnIsUp(BTN_DOWN)){
      if (sub_Pos == SUB_MENU2_CNT) {sub_Pos = 1;} else {sub_Pos++;}
      updateDisplay = true;
      btn_Down_WasDown = false;
    }

    //move the pointer Up
    if (btn_Up_WasDown && btnIsUp(BTN_UP)){
      if (sub_Pos == 1) {sub_Pos = SUB_MENU2_CNT;} else {sub_Pos--;}
      updateDisplay = true;
      btn_Up_WasDown = false;
    }

    //move to the go to the root menu
    if (btn_Cancel_WasDown && btnIsUp(BTN_CANCEL)){currPage = ROOT_MENU; return;}

    // keep a specific pace
    while (millis() - loopStartMs < 25) {delay(2);}
    
  }
  
}
// =======================================================================================
// ||                               PAGE - SUB MENU3                                    ||
// =======================================================================================
void page_SubMenu3(void) {
  
  //flag for updating the display
  boolean updateDisplay = true;
  
  // tracks when entered top of loop
  uint32_t loopStartMs;

  //tracks button states
  boolean btn_Up_WasDown = false;
  boolean btn_Down_WasDown = false;
  boolean btn_Cancel_WasDown = false;
  
  // selected item pointer
  uint8_t sub_Pos = 1;

  //inner loop
  while (true){

    // capture start time
    loopStartMs = millis();

    // print the display
    if (updateDisplay){
      
      // clear the update flag
      updateDisplay = false;

      //clear the display
      clearScreen();

      //menu title
      lcd.println(F("[ SUB MENU #3 ]"));

      //print a divider line
      printDivider();

      // print the items
      printSelected(1, sub_Pos); lcd.println(F("The First Item"));
      printSelected(2, sub_Pos); lcd.println(F("The Second Item"));
      lcd.println();
      lcd.println();
      lcd.println();
      
      //print a divider line
      printDivider();
      
    }

    // capture the button down states
    if (btnIsDown(BTN_UP)) {btn_Up_WasDown = true;}
    if (btnIsDown(BTN_DOWN)) {btn_Down_WasDown = true;}
    if (btnIsDown(BTN_CANCEL)) {btn_Cancel_WasDown = true;}

    //move the pointer down
    if (btn_Down_WasDown && btnIsUp(BTN_DOWN)){
      if (sub_Pos == SUB_MENU3_CNT) {sub_Pos = 1;} else {sub_Pos++;}
      updateDisplay = true;
      btn_Down_WasDown = false;
    }

    //move the pointer Up
    if (btn_Up_WasDown && btnIsUp(BTN_UP)){
      if (sub_Pos == 1) {sub_Pos = SUB_MENU3_CNT;} else {sub_Pos--;}
      updateDisplay = true;
      btn_Up_WasDown = false;
    }

    //move to the go to the root menu
    if (btn_Cancel_WasDown && btnIsUp(BTN_CANCEL)){currPage = ROOT_MENU; return;}

    // keep a specific pace
    while (millis() - loopStartMs < 25) {delay(2);}
    
  }
  
}

// =======================================================================================
// ||                                  TOOLS - DISPLAY                                  ||
// =======================================================================================

void printSelected(uint8_t p1, uint8_t p2){
  if(p1 == p2){
    lcd.print(F(">"));
  }
  else {
    lcd.print(F(" "));
  }
}

void clearScreen(void){
  for (uint8_t i = 0; i < 100; i++) {lcd.println();}
}

void printDivider(void){
  for (uint8_t i = 0; i < 19; i++) {lcd.print("-");}
  lcd.println();
}
      

// =======================================================================================
// ||                             TOOLS - BUTTON PRESSING                               ||
// =======================================================================================

boolean btnIsDown(int btn){
  return digitalRead(btn) == LOW && digitalRead(btn) == LOW;
}

boolean btnIsUp(int btn){
  return digitalRead(btn) == HIGH && digitalRead(btn) == HIGH;
}  

Hallo,
Das LCD verträgt nur Ausgaben mit "lcd.print", nicht "lcd.println".
Eine andere Zeile springst du über die Zeilennummer an.

wow das ging schnell. dank dir!
wenn ich das austausche, dann bekommen ich aber massive Fehlermeldungen.
Ich hab es auch schon mit den befehlen lcd.setCursor(0,1) versucht. das resultat bleibt das gleiche

Welche?

Dann zeige uns den aktuellen Sketch und die Fehlermeldungen.

/* VERSUCH */
#include "LiquidCrystal_I2C.h"
LiquidCrystal_I2C lcd(0x27,20,4);


#define ROOT_MENU_CNT  3
#define SUB_MENU1_CNT  4
#define SUB_MENU2_CNT  5
#define SUB_MENU3_CNT  2

// setup the emum with all the menu pages options
enum pageType {ROOT_MENU, SUB_MENU1, SUB_MENU2, SUB_MENU3};

// holds which page is currently selected
enum pageType currPage = ROOT_MENU;

// selected item pointer for the root menu
uint8_t root_Pos = 1;

// constants holding port addresses
const int BTN_ACCEPT = A0;
const int BTN_UP = A2;
const int BTN_DOWN = A1;
const int BTN_CANCEL = A3;

// =======================================================================================
// ||                                    SETUP                                          ||
// =======================================================================================
void setup() {

  lcd.init();
  lcd.backlight();

  // init the serial port to be used as a display return
  //Serial.begin(115200);

  // setup the basic I/O's
  pinMode(BTN_ACCEPT, INPUT_PULLUP);
  pinMode(BTN_UP, INPUT_PULLUP);
  pinMode(BTN_DOWN, INPUT_PULLUP);
  pinMode(BTN_CANCEL, INPUT_PULLUP);
  
}


// =======================================================================================
// ||                                  MAIN LOOP                                        ||
// =======================================================================================
void loop() {

  switch (currPage){
    case ROOT_MENU:     page_RootMenu(); break;
    case SUB_MENU1:     page_SubMenu1(); break;
    case SUB_MENU2:     page_SubMenu2(); break;
    case SUB_MENU3:     page_SubMenu3(); break;
  }

}

// =======================================================================================
// ||                               PAGE - ROOT MENU                                    ||
// =======================================================================================
void page_RootMenu(void) {

  //flag for updating the display
  boolean updateDisplay = true;
  
  // tracks when entered top of loop
  uint32_t loopStartMs;

  //tracks button states
  boolean btn_Up_WasDown = false;
  boolean btn_Down_WasDown = false;
  boolean btn_Accept_WasDown = false;
  
  //inner loop
  while (true){

    // capture start time
    loopStartMs = millis();

    // print the display
    if (updateDisplay){
      
      // clear the update flag
      updateDisplay = false;

      //clear the display
      clearScreen();

      //menu title
      lcd.print(F("[ Verwaltung AQUAIUS ]"));

      //print a divider line
      printDivider();

      // print the items
      //lcd.setCursor(0, 1);
      printSelected(1, root_Pos); lcd.print(F("Innen"));
      //lcd.setCursor(0, 2);
      printSelected(2, root_Pos); lcd.print(F("Außen"));
      //lcd.setCursor(0, 3);
      printSelected(3, root_Pos); lcd.print(F("Einstellungen"));
      lcd.print();
      lcd.println();
      
      //print a divider line
      printDivider();
      
    }

    // capture the button down states
    if (btnIsDown(BTN_UP)) {btn_Up_WasDown = true;}
    if (btnIsDown(BTN_DOWN)) {btn_Down_WasDown = true;}
    if (btnIsDown(BTN_ACCEPT)) {btn_Accept_WasDown = true;}

    //move the pointer down
    if (btn_Down_WasDown && btnIsUp(BTN_DOWN)){
      if (root_Pos == ROOT_MENU_CNT) {root_Pos = 1;} else {root_Pos++;}
      updateDisplay = true;
      btn_Down_WasDown = false;
    }

    //move the pointer Up
    if (btn_Up_WasDown && btnIsUp(BTN_UP)){
      if (root_Pos == 1) {root_Pos = ROOT_MENU_CNT;} else {root_Pos--;}
      updateDisplay = true;
      btn_Up_WasDown = false;
    }

    //move to the selected page
    if (btn_Accept_WasDown && btnIsUp(BTN_ACCEPT)){
      switch (root_Pos) {
        case 1: currPage = SUB_MENU1; return;
        case 2: currPage = SUB_MENU2; return;
        case 3: currPage = SUB_MENU3; return;
      }
    }
 
    // keep a specific pace
    while (millis() - loopStartMs < 25) {delay(2);}
    
  }
  
}


// =======================================================================================
// ||                               PAGE - SUB MENU1                                    ||
// =======================================================================================
void page_SubMenu1(void) {
  
  //flag for updating the display
  boolean updateDisplay = true;
  
  // tracks when entered top of loop
  uint32_t loopStartMs;

  //tracks button states
  boolean btn_Up_WasDown = false;
  boolean btn_Down_WasDown = false;
  boolean btn_Cancel_WasDown = false;
  
  // selected item pointer
  uint8_t sub_Pos = 1;

  //inner loop
  while (true){

    // capture start time
    loopStartMs = millis();

    // print the display
    if (updateDisplay){
      
      // clear the update flag
      updateDisplay = false;

      //clear the display
      clearScreen();

      //menu title
      lcd.print(F("[ SUB MENU #1 ]"));

      //print a divider line
      printDivider();

      // print the items
      printSelected(1, sub_Pos); lcd.print(F("The First Item"));
      printSelected(2, sub_Pos); lcd.print(F("The Second Item"));
      printSelected(3, sub_Pos); lcd.print(F("The Third Item"));
      printSelected(4, sub_Pos); lcd.print(F("The Forth Item"));
      lcd.print();
      
      //print a divider line
      printDivider();
      
    }

    // capture the button down states
    if (btnIsDown(BTN_UP)) {btn_Up_WasDown = true;}
    if (btnIsDown(BTN_DOWN)) {btn_Down_WasDown = true;}
    if (btnIsDown(BTN_CANCEL)) {btn_Cancel_WasDown = true;}

    //move the pointer down
    if (btn_Down_WasDown && btnIsUp(BTN_DOWN)){
      if (sub_Pos == SUB_MENU1_CNT) {sub_Pos = 1;} else {sub_Pos++;}
      updateDisplay = true;
      btn_Down_WasDown = false;
    }

    //move the pointer Up
    if (btn_Up_WasDown && btnIsUp(BTN_UP)){
      if (sub_Pos == 1) {sub_Pos = SUB_MENU1_CNT;} else {sub_Pos--;}
      updateDisplay = true;
      btn_Up_WasDown = false;
    }

    //move to the go to the root menu
    if (btn_Cancel_WasDown && btnIsUp(BTN_CANCEL)){currPage = ROOT_MENU; return;}

    // keep a specific pace
    while (millis() - loopStartMs < 25) {delay(2);}
    
  }
  
}


// =======================================================================================
// ||                               PAGE - SUB MENU2                                    ||
// =======================================================================================
void page_SubMenu2(void) {
  
  //flag for updating the display
  boolean updateDisplay = true;
  
  // tracks when entered top of loop
  uint32_t loopStartMs;

  //tracks button states
  boolean btn_Up_WasDown = false;
  boolean btn_Down_WasDown = false;
  boolean btn_Cancel_WasDown = false;
  
  // selected item pointer
  uint8_t sub_Pos = 1;

  //inner loop
  while (true){

    // capture start time
    loopStartMs = millis();

    // print the display
    if (updateDisplay){
      
      // clear the update flag
      updateDisplay = false;

      //clear the display
      clearScreen();

      //menu title
      lcd.print(F("[ SUB MENU #2 ]"));

      //print a divider line
      printDivider();

      // print the items
      printSelected(1, sub_Pos); lcd.print(F("The First Item"));
      printSelected(2, sub_Pos); lcd.print(F("The Second Item"));
      printSelected(3, sub_Pos); lcd.print(F("The Third Item"));
      printSelected(4, sub_Pos); lcd.print(F("The Forth Item"));
      printSelected(5, sub_Pos); lcd.print(F("The Fifth Item"));
      
      //print a divider line
      printDivider();
      
    }

    // capture the button down states
    if (btnIsDown(BTN_UP)) {btn_Up_WasDown = true;}
    if (btnIsDown(BTN_DOWN)) {btn_Down_WasDown = true;}
    if (btnIsDown(BTN_CANCEL)) {btn_Cancel_WasDown = true;}

    //move the pointer down
    if (btn_Down_WasDown && btnIsUp(BTN_DOWN)){
      if (sub_Pos == SUB_MENU2_CNT) {sub_Pos = 1;} else {sub_Pos++;}
      updateDisplay = true;
      btn_Down_WasDown = false;
    }

    //move the pointer Up
    if (btn_Up_WasDown && btnIsUp(BTN_UP)){
      if (sub_Pos == 1) {sub_Pos = SUB_MENU2_CNT;} else {sub_Pos--;}
      updateDisplay = true;
      btn_Up_WasDown = false;
    }

    //move to the go to the root menu
    if (btn_Cancel_WasDown && btnIsUp(BTN_CANCEL)){currPage = ROOT_MENU; return;}

    // keep a specific pace
    while (millis() - loopStartMs < 25) {delay(2);}
    
  }
  
}
// =======================================================================================
// ||                               PAGE - SUB MENU3                                    ||
// =======================================================================================
void page_SubMenu3(void) {
  
  //flag for updating the display
  boolean updateDisplay = true;
  
  // tracks when entered top of loop
  uint32_t loopStartMs;

  //tracks button states
  boolean btn_Up_WasDown = false;
  boolean btn_Down_WasDown = false;
  boolean btn_Cancel_WasDown = false;
  
  // selected item pointer
  uint8_t sub_Pos = 1;

  //inner loop
  while (true){

    // capture start time
    loopStartMs = millis();

    // print the display
    if (updateDisplay){
      
      // clear the update flag
      updateDisplay = false;

      //clear the display
      clearScreen();

      //menu title
      lcd.print(F("[ SUB MENU #3 ]"));

      //print a divider line
      printDivider();

      // print the items
      printSelected(1, sub_Pos); lcd.print(F("The First Item"));
      printSelected(2, sub_Pos); lcd.print(F("The Second Item"));
      lcd.print();
      lcd.print();
      lcd.print();
      
      //print a divider line
      printDivider();
      
    }

    // capture the button down states
    if (btnIsDown(BTN_UP)) {btn_Up_WasDown = true;}
    if (btnIsDown(BTN_DOWN)) {btn_Down_WasDown = true;}
    if (btnIsDown(BTN_CANCEL)) {btn_Cancel_WasDown = true;}

    //move the pointer down
    if (btn_Down_WasDown && btnIsUp(BTN_DOWN)){
      if (sub_Pos == SUB_MENU3_CNT) {sub_Pos = 1;} else {sub_Pos++;}
      updateDisplay = true;
      btn_Down_WasDown = false;
    }

    //move the pointer Up
    if (btn_Up_WasDown && btnIsUp(BTN_UP)){
      if (sub_Pos == 1) {sub_Pos = SUB_MENU3_CNT;} else {sub_Pos--;}
      updateDisplay = true;
      btn_Up_WasDown = false;
    }

    //move to the go to the root menu
    if (btn_Cancel_WasDown && btnIsUp(BTN_CANCEL)){currPage = ROOT_MENU; return;}

    // keep a specific pace
    while (millis() - loopStartMs < 25) {delay(2);}
    
  }
  
}

// =======================================================================================
// ||                                  TOOLS - DISPLAY                                  ||
// =======================================================================================

void printSelected(uint8_t p1, uint8_t p2){
  if(p1 == p2){
    lcd.print(F(">"));
  }
  else {
    lcd.print(F(" "));
  }
}

void clearScreen(void){
  for (uint8_t i = 0; i < 20; i++) {lcd.print();}
}

void printDivider(void){
  for (uint8_t i = 0; i < 20; i++) {lcd.print("-");}
  lcd.print();
}
      

// =======================================================================================
// ||                             TOOLS - BUTTON PRESSING                               ||
// =======================================================================================

boolean btnIsDown(int btn){
  return digitalRead(btn) == LOW && digitalRead(btn) == LOW;
}

boolean btnIsUp(int btn){
  return digitalRead(btn) == HIGH && digitalRead(btn) == HIGH;
}  
G:\Ardurino\Menu_Grund_unter_2_display\Menu_Grund_unter_2_display.ino: In function 'void page_RootMenu()':
G:\Ardurino\Menu_Grund_unter_2_display\Menu_Grund_unter_2_display.ino:104:17: error: no matching function for call to 'LiquidCrystal_I2C::print()'
       lcd.print();
                 ^
In file included from C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Stream.h:26:0,
                 from C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/HardwareSerial.h:29,
                 from C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:233,
                 from C:\Users\schre\AppData\Local\Temp\arduino\sketches\238ADC3994A17B8B96C813F855FC18AD\sketch\Menu_Grund_unter_2_display.ino.cpp:1:
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:65:12: note: candidate: size_t Print::print(const __FlashStringHelper*)
     size_t print(const __FlashStringHelper *);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:65:12: note:   candidate expects 1 argument, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:66:12: note: candidate: size_t Print::print(const String&)
     size_t print(const String &);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:66:12: note:   candidate expects 1 argument, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:67:12: note: candidate: size_t Print::print(const char*)
     size_t print(const char[]);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:67:12: note:   candidate expects 1 argument, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:68:12: note: candidate: size_t Print::print(char)
     size_t print(char);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:68:12: note:   candidate expects 1 argument, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:69:12: note: candidate: size_t Print::print(unsigned char, int)
     size_t print(unsigned char, int = DEC);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:69:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:70:12: note: candidate: size_t Print::print(int, int)
     size_t print(int, int = DEC);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:70:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:71:12: note: candidate: size_t Print::print(unsigned int, int)
     size_t print(unsigned int, int = DEC);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:71:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:72:12: note: candidate: size_t Print::print(long int, int)
     size_t print(long, int = DEC);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:72:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:73:12: note: candidate: size_t Print::print(long unsigned int, int)
     size_t print(unsigned long, int = DEC);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:73:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:74:12: note: candidate: size_t Print::print(double, int)
     size_t print(double, int = 2);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:74:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:75:12: note: candidate: size_t Print::print(const Printable&)
     size_t print(const Printable&);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:75:12: note:   candidate expects 1 argument, 0 provided
G:\Ardurino\Menu_Grund_unter_2_display\Menu_Grund_unter_2_display.ino: In function 'void page_SubMenu1()':
G:\Ardurino\Menu_Grund_unter_2_display\Menu_Grund_unter_2_display.ino:193:17: error: no matching function for call to 'LiquidCrystal_I2C::print()'
       lcd.print();
                 ^
In file included from C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Stream.h:26:0,
                 from C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/HardwareSerial.h:29,
                 from C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:233,
                 from C:\Users\schre\AppData\Local\Temp\arduino\sketches\238ADC3994A17B8B96C813F855FC18AD\sketch\Menu_Grund_unter_2_display.ino.cpp:1:
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:65:12: note: candidate: size_t Print::print(const __FlashStringHelper*)
     size_t print(const __FlashStringHelper *);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:65:12: note:   candidate expects 1 argument, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:66:12: note: candidate: size_t Print::print(const String&)
     size_t print(const String &);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:66:12: note:   candidate expects 1 argument, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:67:12: note: candidate: size_t Print::print(const char*)
     size_t print(const char[]);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:67:12: note:   candidate expects 1 argument, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:68:12: note: candidate: size_t Print::print(char)
     size_t print(char);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:68:12: note:   candidate expects 1 argument, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:69:12: note: candidate: size_t Print::print(unsigned char, int)
     size_t print(unsigned char, int = DEC);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:69:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:70:12: note: candidate: size_t Print::print(int, int)
     size_t print(int, int = DEC);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:70:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:71:12: note: candidate: size_t Print::print(unsigned int, int)
     size_t print(unsigned int, int = DEC);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:71:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:72:12: note: candidate: size_t Print::print(long int, int)
     size_t print(long, int = DEC);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:72:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:73:12: note: candidate: size_t Print::print(long unsigned int, int)
     size_t print(unsigned long, int = DEC);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:73:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:74:12: note: candidate: size_t Print::print(double, int)
     size_t print(double, int = 2);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:74:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:75:12: note: candidate: size_t Print::print(const Printable&)
     size_t print(const Printable&);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:75:12: note:   candidate expects 1 argument, 0 provided
G:\Ardurino\Menu_Grund_unter_2_display\Menu_Grund_unter_2_display.ino: In function 'void page_SubMenu3()':
G:\Ardurino\Menu_Grund_unter_2_display\Menu_Grund_unter_2_display.ino:353:17: error: no matching function for call to 'LiquidCrystal_I2C::print()'
       lcd.print();
                 ^
In file included from C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Stream.h:26:0,
                 from C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/HardwareSerial.h:29,
                 from C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:233,
                 from C:\Users\schre\AppData\Local\Temp\arduino\sketches\238ADC3994A17B8B96C813F855FC18AD\sketch\Menu_Grund_unter_2_display.ino.cpp:1:
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:65:12: note: candidate: size_t Print::print(const __FlashStringHelper*)
     size_t print(const __FlashStringHelper *);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:65:12: note:   candidate expects 1 argument, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:66:12: note: candidate: size_t Print::print(const String&)
     size_t print(const String &);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:66:12: note:   candidate expects 1 argument, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:67:12: note: candidate: size_t Print::print(const char*)
     size_t print(const char[]);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:67:12: note:   candidate expects 1 argument, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:68:12: note: candidate: size_t Print::print(char)
     size_t print(char);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:68:12: note:   candidate expects 1 argument, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:69:12: note: candidate: size_t Print::print(unsigned char, int)
     size_t print(unsigned char, int = DEC);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:69:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:70:12: note: candidate: size_t Print::print(int, int)
     size_t print(int, int = DEC);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:70:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:71:12: note: candidate: size_t Print::print(unsigned int, int)
     size_t print(unsigned int, int = DEC);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:71:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:72:12: note: candidate: size_t Print::print(long int, int)
     size_t print(long, int = DEC);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:72:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:73:12: note: candidate: size_t Print::print(long unsigned int, int)
     size_t print(unsigned long, int = DEC);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:73:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:74:12: note: candidate: size_t Print::print(double, int)
     size_t print(double, int = 2);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:74:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:75:12: note: candidate: size_t Print::print(const Printable&)
     size_t print(const Printable&);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:75:12: note:   candidate expects 1 argument, 0 provided
G:\Ardurino\Menu_Grund_unter_2_display\Menu_Grund_unter_2_display.ino:354:17: error: no matching function for call to 'LiquidCrystal_I2C::print()'
       lcd.print();
                 ^
In file included from C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Stream.h:26:0,
                 from C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/HardwareSerial.h:29,
                 from C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:233,
                 from C:\Users\schre\AppData\Local\Temp\arduino\sketches\238ADC3994A17B8B96C813F855FC18AD\sketch\Menu_Grund_unter_2_display.ino.cpp:1:
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:65:12: note: candidate: size_t Print::print(const __FlashStringHelper*)
     size_t print(const __FlashStringHelper *);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:65:12: note:   candidate expects 1 argument, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:66:12: note: candidate: size_t Print::print(const String&)
     size_t print(const String &);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:66:12: note:   candidate expects 1 argument, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:67:12: note: candidate: size_t Print::print(const char*)
     size_t print(const char[]);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:67:12: note:   candidate expects 1 argument, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:68:12: note: candidate: size_t Print::print(char)
     size_t print(char);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:68:12: note:   candidate expects 1 argument, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:69:12: note: candidate: size_t Print::print(unsigned char, int)
     size_t print(unsigned char, int = DEC);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:69:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:70:12: note: candidate: size_t Print::print(int, int)
     size_t print(int, int = DEC);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:70:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:71:12: note: candidate: size_t Print::print(unsigned int, int)
     size_t print(unsigned int, int = DEC);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:71:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:72:12: note: candidate: size_t Print::print(long int, int)
     size_t print(long, int = DEC);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:72:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:73:12: note: candidate: size_t Print::print(long unsigned int, int)
     size_t print(unsigned long, int = DEC);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:73:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:74:12: note: candidate: size_t Print::print(double, int)
     size_t print(double, int = 2);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:74:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:75:12: note: candidate: size_t Print::print(const Printable&)
     size_t print(const Printable&);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:75:12: note:   candidate expects 1 argument, 0 provided
G:\Ardurino\Menu_Grund_unter_2_display\Menu_Grund_unter_2_display.ino:355:17: error: no matching function for call to 'LiquidCrystal_I2C::print()'
       lcd.print();
                 ^
In file included from C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Stream.h:26:0,
                 from C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/HardwareSerial.h:29,
                 from C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:233,
                 from C:\Users\schre\AppData\Local\Temp\arduino\sketches\238ADC3994A17B8B96C813F855FC18AD\sketch\Menu_Grund_unter_2_display.ino.cpp:1:
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:65:12: note: candidate: size_t Print::print(const __FlashStringHelper*)
     size_t print(const __FlashStringHelper *);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:65:12: note:   candidate expects 1 argument, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:66:12: note: candidate: size_t Print::print(const String&)
     size_t print(const String &);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:66:12: note:   candidate expects 1 argument, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:67:12: note: candidate: size_t Print::print(const char*)
     size_t print(const char[]);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:67:12: note:   candidate expects 1 argument, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:68:12: note: candidate: size_t Print::print(char)
     size_t print(char);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:68:12: note:   candidate expects 1 argument, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:69:12: note: candidate: size_t Print::print(unsigned char, int)
     size_t print(unsigned char, int = DEC);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:69:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:70:12: note: candidate: size_t Print::print(int, int)
     size_t print(int, int = DEC);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:70:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:71:12: note: candidate: size_t Print::print(unsigned int, int)
     size_t print(unsigned int, int = DEC);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:71:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:72:12: note: candidate: size_t Print::print(long int, int)
     size_t print(long, int = DEC);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:72:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:73:12: note: candidate: size_t Print::print(long unsigned int, int)
     size_t print(unsigned long, int = DEC);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:73:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:74:12: note: candidate: size_t Print::print(double, int)
     size_t print(double, int = 2);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:74:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:75:12: note: candidate: size_t Print::print(const Printable&)
     size_t print(const Printable&);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:75:12: note:   candidate expects 1 argument, 0 provided
G:\Ardurino\Menu_Grund_unter_2_display\Menu_Grund_unter_2_display.ino: In function 'void clearScreen()':
G:\Ardurino\Menu_Grund_unter_2_display\Menu_Grund_unter_2_display.ino:405:47: error: no matching function for call to 'LiquidCrystal_I2C::print()'
   for (uint8_t i = 0; i < 20; i++) {lcd.print();}
                                               ^
In file included from C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Stream.h:26:0,
                 from C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/HardwareSerial.h:29,
                 from C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:233,
                 from C:\Users\schre\AppData\Local\Temp\arduino\sketches\238ADC3994A17B8B96C813F855FC18AD\sketch\Menu_Grund_unter_2_display.ino.cpp:1:
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:65:12: note: candidate: size_t Print::print(const __FlashStringHelper*)
     size_t print(const __FlashStringHelper *);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:65:12: note:   candidate expects 1 argument, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:66:12: note: candidate: size_t Print::print(const String&)
     size_t print(const String &);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:66:12: note:   candidate expects 1 argument, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:67:12: note: candidate: size_t Print::print(const char*)
     size_t print(const char[]);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:67:12: note:   candidate expects 1 argument, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:68:12: note: candidate: size_t Print::print(char)
     size_t print(char);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:68:12: note:   candidate expects 1 argument, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:69:12: note: candidate: size_t Print::print(unsigned char, int)
     size_t print(unsigned char, int = DEC);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:69:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:70:12: note: candidate: size_t Print::print(int, int)
     size_t print(int, int = DEC);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:70:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:71:12: note: candidate: size_t Print::print(unsigned int, int)
     size_t print(unsigned int, int = DEC);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:71:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:72:12: note: candidate: size_t Print::print(long int, int)
     size_t print(long, int = DEC);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:72:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:73:12: note: candidate: size_t Print::print(long unsigned int, int)
     size_t print(unsigned long, int = DEC);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:73:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:74:12: note: candidate: size_t Print::print(double, int)
     size_t print(double, int = 2);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:74:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:75:12: note: candidate: size_t Print::print(const Printable&)
     size_t print(const Printable&);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:75:12: note:   candidate expects 1 argument, 0 provided
G:\Ardurino\Menu_Grund_unter_2_display\Menu_Grund_unter_2_display.ino: In function 'void printDivider()':
G:\Ardurino\Menu_Grund_unter_2_display\Menu_Grund_unter_2_display.ino:410:13: error: no matching function for call to 'LiquidCrystal_I2C::print()'
   lcd.print();
             ^
In file included from C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Stream.h:26:0,
                 from C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/HardwareSerial.h:29,
                 from C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Arduino.h:233,
                 from C:\Users\schre\AppData\Local\Temp\arduino\sketches\238ADC3994A17B8B96C813F855FC18AD\sketch\Menu_Grund_unter_2_display.ino.cpp:1:
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:65:12: note: candidate: size_t Print::print(const __FlashStringHelper*)
     size_t print(const __FlashStringHelper *);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:65:12: note:   candidate expects 1 argument, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:66:12: note: candidate: size_t Print::print(const String&)
     size_t print(const String &);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:66:12: note:   candidate expects 1 argument, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:67:12: note: candidate: size_t Print::print(const char*)
     size_t print(const char[]);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:67:12: note:   candidate expects 1 argument, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:68:12: note: candidate: size_t Print::print(char)
     size_t print(char);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:68:12: note:   candidate expects 1 argument, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:69:12: note: candidate: size_t Print::print(unsigned char, int)
     size_t print(unsigned char, int = DEC);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:69:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:70:12: note: candidate: size_t Print::print(int, int)
     size_t print(int, int = DEC);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:70:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:71:12: note: candidate: size_t Print::print(unsigned int, int)
     size_t print(unsigned int, int = DEC);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:71:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:72:12: note: candidate: size_t Print::print(long int, int)
     size_t print(long, int = DEC);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:72:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:73:12: note: candidate: size_t Print::print(long unsigned int, int)
     size_t print(unsigned long, int = DEC);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:73:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:74:12: note: candidate: size_t Print::print(double, int)
     size_t print(double, int = 2);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:74:12: note:   candidate expects 2 arguments, 0 provided
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:75:12: note: candidate: size_t Print::print(const Printable&)
     size_t print(const Printable&);
            ^~~~~
C:\Users\schre\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino/Print.h:75:12: note:   candidate expects 1 argument, 0 provided

exit status 1

Compilation error: no matching function for call to 'LiquidCrystal_I2C::print()'

Ich vermisse noch die Angaben wo der Cursor stehen soll.
Beispiel:

lcd.setCursor(Stelle, Zeile);

Bzw. die hast du falsch geschrieben (kleine l, nicht Großes L)

Zeig doch mal einen Link auf deine "LiquidCrystal_I2C.h".
Hast du dir da mal die Beispiele angeschaut ?
Ich vermute, deine Anweisungen passen nicht zur Library.

1 Like

Hallo fabian2929

Tausche alle

lcd.print();

gegen

lcd.print(" ");

aus.

1 Like

ich würde sagen, wenn du nichts ausgeben willst, dann lass die Zeile ganz weg

1 Like

Hab jetzt die Library nochmal neu eingelesen. jetzt schauts wesentlich besser aus! Dank dir!

Dank dir! Damit waren die Fehlermeldungen alle weg!

Hier musst du aufpassen, je nach Prozessor schlägt der Watchdog zu. Du hast bereits eine loop. Sie heist loop. Da braucht man keine innere loop.

Jetzt noch eine letzte Frage.
im SUB MENU #2 würde ich gerne 5 Untertitel haben wollen.
Wie würdet ihr denn dann die Auflistung machen? kann ich die irgendwie zum scrollen machen?

menu2

void page_SubMenu2(void) {
  
  //flag for updating the display
  boolean updateDisplay = true;
  
  // tracks when entered top of loop
  uint32_t loopStartMs;

  //tracks button states
  boolean btn_Up_WasDown = false;
  boolean btn_Down_WasDown = false;
  boolean btn_Cancel_WasDown = false;
  
  // selected item pointer
  uint8_t sub_Pos = 1;

  //inner loop
  while (true){

    // capture start time
    loopStartMs = millis();

    // print the display
    if (updateDisplay){
      
      // clear the update flag
      updateDisplay = false;

      //clear the display
      lcd.clear();

      //menu title
      lcd.setCursor(0, 0);
      lcd.print(F("[ SUB MENU #2 ]"));

      //print a divider line
      //printDivider();

      // print the items
      lcd.setCursor(0, 1);
      printSelected(1, sub_Pos); lcd.print(F("The First Item"));
      lcd.setCursor(0, 2);
      printSelected(2, sub_Pos); lcd.print(F("The Second Item"));
      lcd.setCursor(0, 3);
      printSelected(3, sub_Pos); lcd.print(F("The Third Item"));
      lcd.setCursor(0, 4);
      printSelected(4, sub_Pos); lcd.print(F("The Forth Item"));
      lcd.setCursor(0, 5);
      printSelected(5, sub_Pos); lcd.print(F("The Fifth Item"));
      
      //print a divider line
      //printDivider();
      
    }

    // capture the button down states
    if (btnIsDown(BTN_UP)) {btn_Up_WasDown = true;}
    if (btnIsDown(BTN_DOWN)) {btn_Down_WasDown = true;}
    if (btnIsDown(BTN_CANCEL)) {btn_Cancel_WasDown = true;}

    //move the pointer down
    if (btn_Down_WasDown && btnIsUp(BTN_DOWN)){
      if (sub_Pos == SUB_MENU2_CNT) {sub_Pos = 1;} else {sub_Pos++;}
      updateDisplay = true;
      btn_Down_WasDown = false;
    }

    //move the pointer Up
    if (btn_Up_WasDown && btnIsUp(BTN_UP)){
      if (sub_Pos == 1) {sub_Pos = SUB_MENU2_CNT;} else {sub_Pos--;}
      updateDisplay = true;
      btn_Up_WasDown = false;
    }

    //move to the go to the root menu
    if (btn_Cancel_WasDown && btnIsUp(BTN_CANCEL)){currPage = ROOT_MENU; return;}

    // keep a specific pace
    while (millis() - loopStartMs < 25) {delay(2);}
    
  }
  
}

ganzer code

/* VERSUCH 
hier gehts weiter*/
#include <Wire.h> 
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27,20,4);


#define ROOT_MENU_CNT  3
#define SUB_MENU1_CNT  4
#define SUB_MENU2_CNT  5
#define SUB_MENU3_CNT  2

// setup the emum with all the menu pages options
enum pageType {ROOT_MENU, SUB_MENU1, SUB_MENU2, SUB_MENU3};

// holds which page is currently selected
enum pageType currPage = ROOT_MENU;

// selected item pointer for the root menu
uint8_t root_Pos = 1;

// constants holding port addresses
const int BTN_ACCEPT = A0;
const int BTN_UP = A2;
const int BTN_DOWN = A1;
const int BTN_CANCEL = A3;

// =======================================================================================
// ||                                    SETUP                                          ||
// =======================================================================================
void setup() {

  lcd.init();
  lcd.init();
  lcd.backlight();

  // init the serial port to be used as a display return
  //Serial.begin(115200);

  // setup the basic I/O's
  pinMode(BTN_ACCEPT, INPUT_PULLUP);
  pinMode(BTN_UP, INPUT_PULLUP);
  pinMode(BTN_DOWN, INPUT_PULLUP);
  pinMode(BTN_CANCEL, INPUT_PULLUP);
  
}


// =======================================================================================
// ||                                  MAIN LOOP                                        ||
// =======================================================================================
void loop() {

  switch (currPage){
    case ROOT_MENU:     page_RootMenu(); break;
    case SUB_MENU1:     page_SubMenu1(); break;
    case SUB_MENU2:     page_SubMenu2(); break;
    case SUB_MENU3:     page_SubMenu3(); break;
  }

}

// =======================================================================================
// ||                               PAGE - ROOT MENU                                    ||
// =======================================================================================
void page_RootMenu(void) {

  //flag for updating the display
  boolean updateDisplay = true;
  
  // tracks when entered top of loop
  uint32_t loopStartMs;

  //tracks button states
  boolean btn_Up_WasDown = false;
  boolean btn_Down_WasDown = false;
  boolean btn_Accept_WasDown = false;
  
  //inner loop
  while (true){

    // capture start time
    loopStartMs = millis();

    // print the display
    if (updateDisplay){
      
      // clear the update flag
      updateDisplay = false;

      //clear the display
      lcd.clear();

      //menu title
      lcd.print(F("[Verwaltung]"));

      //print a divider line
      //printDivider();

      // print the items
      lcd.setCursor(0, 1);
      printSelected(1, root_Pos); lcd.print(F("Innen"));
      lcd.setCursor(0, 2);
      printSelected(2, root_Pos); lcd.print(F("Außen"));
      lcd.setCursor(0, 3);
      printSelected(3, root_Pos); lcd.print(F("Einstellungen"));
      //lcd.setCursor(0, 4);
      //lcd.print("");
      //lcd.print("");
      
      //print a divider line
      //printDivider();
      
    }

    // capture the button down states
    if (btnIsDown(BTN_UP)) {btn_Up_WasDown = true;}
    if (btnIsDown(BTN_DOWN)) {btn_Down_WasDown = true;}
    if (btnIsDown(BTN_ACCEPT)) {btn_Accept_WasDown = true;}

    //move the pointer down
    if (btn_Down_WasDown && btnIsUp(BTN_DOWN)){
      if (root_Pos == ROOT_MENU_CNT) {root_Pos = 1;} else {root_Pos++;}
      updateDisplay = true;
      btn_Down_WasDown = false;
    }

    //move the pointer Up
    if (btn_Up_WasDown && btnIsUp(BTN_UP)){
      if (root_Pos == 1) {root_Pos = ROOT_MENU_CNT;} else {root_Pos--;}
      updateDisplay = true;
      btn_Up_WasDown = false;
    }

    //move to the selected page
    if (btn_Accept_WasDown && btnIsUp(BTN_ACCEPT)){
      switch (root_Pos) {
        case 1: currPage = SUB_MENU1; return;
        case 2: currPage = SUB_MENU2; return;
        case 3: currPage = SUB_MENU3; return;
      }
    }
 
    // keep a specific pace
    while (millis() - loopStartMs < 25) {delay(2);}
    
  }
  
}


// =======================================================================================
// ||                               PAGE - SUB MENU1                                    ||
// =======================================================================================
void page_SubMenu1(void) {
  
  //flag for updating the display
  boolean updateDisplay = true;
  
  // tracks when entered top of loop
  uint32_t loopStartMs;

  //tracks button states
  boolean btn_Up_WasDown = false;
  boolean btn_Down_WasDown = false;
  boolean btn_Cancel_WasDown = false;
  
  // selected item pointer
  uint8_t sub_Pos = 1;

  //inner loop
  while (true){

    // capture start time
    loopStartMs = millis();

    // print the display
    if (updateDisplay){
      
      // clear the update flag
      updateDisplay = false;

      //clear the display
      lcd.clear();

      //menu title
      lcd.print(F("[ SUB MENU #1 ]"));

      //print a divider line
      //printDivider();

      // print the items
      lcd.setCursor(0, 1);
      printSelected(1, sub_Pos); lcd.print(F("The First Item"));
      lcd.setCursor(0, 2);
      printSelected(2, sub_Pos); lcd.print(F("The Second Item"));
      lcd.setCursor(0, 3);
      printSelected(3, sub_Pos); lcd.print(F("The Third Item"));
      //lcd.setCursor(0, 4);
      //printSelected(4, sub_Pos); lcd.print(F("The Forth Item"));
      //lcd.print("");
      
      //print a divider line
      //printDivider();
      
    }

    // capture the button down states
    if (btnIsDown(BTN_UP)) {btn_Up_WasDown = true;}
    if (btnIsDown(BTN_DOWN)) {btn_Down_WasDown = true;}
    if (btnIsDown(BTN_CANCEL)) {btn_Cancel_WasDown = true;}

    //move the pointer down
    if (btn_Down_WasDown && btnIsUp(BTN_DOWN)){
      if (sub_Pos == SUB_MENU1_CNT) {sub_Pos = 1;} else {sub_Pos++;}
      updateDisplay = true;
      btn_Down_WasDown = false;
    }

    //move the pointer Up
    if (btn_Up_WasDown && btnIsUp(BTN_UP)){
      if (sub_Pos == 1) {sub_Pos = SUB_MENU1_CNT;} else {sub_Pos--;}
      updateDisplay = true;
      btn_Up_WasDown = false;
    }

    //move to the go to the root menu
    if (btn_Cancel_WasDown && btnIsUp(BTN_CANCEL)){currPage = ROOT_MENU; return;}

    // keep a specific pace
    while (millis() - loopStartMs < 25) {delay(2);}
    
  }
  
}


// =======================================================================================
// ||                               PAGE - SUB MENU2                                    ||
// =======================================================================================
void page_SubMenu2(void) {
  
  //flag for updating the display
  boolean updateDisplay = true;
  
  // tracks when entered top of loop
  uint32_t loopStartMs;

  //tracks button states
  boolean btn_Up_WasDown = false;
  boolean btn_Down_WasDown = false;
  boolean btn_Cancel_WasDown = false;
  
  // selected item pointer
  uint8_t sub_Pos = 1;

  //inner loop
  while (true){

    // capture start time
    loopStartMs = millis();

    // print the display
    if (updateDisplay){
      
      // clear the update flag
      updateDisplay = false;

      //clear the display
      lcd.clear();

      //menu title
      lcd.setCursor(0, 0);
      lcd.print(F("[ SUB MENU #2 ]"));

      //print a divider line
      //printDivider();

      // print the items
      lcd.setCursor(0, 1);
      printSelected(1, sub_Pos); lcd.print(F("The First Item"));
      lcd.setCursor(0, 2);
      printSelected(2, sub_Pos); lcd.print(F("The Second Item"));
      lcd.setCursor(0, 3);
      printSelected(3, sub_Pos); lcd.print(F("The Third Item"));
      lcd.setCursor(0, 4);
      printSelected(4, sub_Pos); lcd.print(F("The Forth Item"));
      lcd.setCursor(0, 5);
      printSelected(5, sub_Pos); lcd.print(F("The Fifth Item"));
      
      //print a divider line
      //printDivider();
      
    }

    // capture the button down states
    if (btnIsDown(BTN_UP)) {btn_Up_WasDown = true;}
    if (btnIsDown(BTN_DOWN)) {btn_Down_WasDown = true;}
    if (btnIsDown(BTN_CANCEL)) {btn_Cancel_WasDown = true;}

    //move the pointer down
    if (btn_Down_WasDown && btnIsUp(BTN_DOWN)){
      if (sub_Pos == SUB_MENU2_CNT) {sub_Pos = 1;} else {sub_Pos++;}
      updateDisplay = true;
      btn_Down_WasDown = false;
    }

    //move the pointer Up
    if (btn_Up_WasDown && btnIsUp(BTN_UP)){
      if (sub_Pos == 1) {sub_Pos = SUB_MENU2_CNT;} else {sub_Pos--;}
      updateDisplay = true;
      btn_Up_WasDown = false;
    }

    //move to the go to the root menu
    if (btn_Cancel_WasDown && btnIsUp(BTN_CANCEL)){currPage = ROOT_MENU; return;}

    // keep a specific pace
    while (millis() - loopStartMs < 25) {delay(2);}
    
  }
  
}
// =======================================================================================
// ||                               PAGE - SUB MENU3                                    ||
// =======================================================================================
void page_SubMenu3(void) {
  
  //flag for updating the display
  boolean updateDisplay = true;
  
  // tracks when entered top of loop
  uint32_t loopStartMs;

  //tracks button states
  boolean btn_Up_WasDown = false;
  boolean btn_Down_WasDown = false;
  boolean btn_Cancel_WasDown = false;
  
  // selected item pointer
  uint8_t sub_Pos = 1;

  //inner loop
  while (true){

    // capture start time
    loopStartMs = millis();

    // print the display
    if (updateDisplay){
      
      // clear the update flag
      updateDisplay = false;

      //clear the display
      lcd.clear();

      //menu title
      lcd.print(F("[ SUB MENU #3 ]"));

      //print a divider line
      //printDivider();

      // print the items
      lcd.setCursor(0, 1);
      printSelected(1, sub_Pos); lcd.print(F("The First Item"));
      lcd.setCursor(0, 2);
      printSelected(2, sub_Pos); lcd.print(F("The Second Item"));
      //lcd.print("");
      //lcd.print("");
      //lcd.print("");
      
      //print a divider line
      //printDivider();
      
    }

    // capture the button down states
    if (btnIsDown(BTN_UP)) {btn_Up_WasDown = true;}
    if (btnIsDown(BTN_DOWN)) {btn_Down_WasDown = true;}
    if (btnIsDown(BTN_CANCEL)) {btn_Cancel_WasDown = true;}

    //move the pointer down
    if (btn_Down_WasDown && btnIsUp(BTN_DOWN)){
      if (sub_Pos == SUB_MENU3_CNT) {sub_Pos = 1;} else {sub_Pos++;}
      updateDisplay = true;
      btn_Down_WasDown = false;
    }

    //move the pointer Up
    if (btn_Up_WasDown && btnIsUp(BTN_UP)){
      if (sub_Pos == 1) {sub_Pos = SUB_MENU3_CNT;} else {sub_Pos--;}
      updateDisplay = true;
      btn_Up_WasDown = false;
    }

    //move to the go to the root menu
    if (btn_Cancel_WasDown && btnIsUp(BTN_CANCEL)){currPage = ROOT_MENU; return;}

    // keep a specific pace
    while (millis() - loopStartMs < 25) {delay(2);}
    
  }
  
}

// =======================================================================================
// ||                                  TOOLS - DISPLAY                                  ||
// =======================================================================================

void printSelected(uint8_t p1, uint8_t p2){
  if(p1 == p2){
    lcd.print(F(">"));
  }
  else {
    lcd.print(F(" "));
  }
}

void clearScreen(void){
  for (uint8_t i = 0; i < 20; i++) {lcd.print("");}
}

void printDivider(void){
  for (uint8_t i = 0; i < 2; i++) {lcd.print("-");}
  lcd.print("");
}
      

// =======================================================================================
// ||                             TOOLS - BUTTON PRESSING                               ||
// =======================================================================================

boolean btnIsDown(int btn){
  return digitalRead(btn) == LOW && digitalRead(btn) == LOW;
}

boolean btnIsUp(int btn){
  return digitalRead(btn) == HIGH && digitalRead(btn) == HIGH;
}  
  while (true){

    // capture start time
    loopStartMs = millis();

Brauch ich das hier nicht für die millis funktion?

Hallo fabian2929

Ich habe mir mal das Programm kurz angeschaut.
Das Programm sieht mir sehr organisch gewachsen aus.

Ein Programm für eine Menuesteuerung ist eine schöne, aber große Herausforderung, die eine gute Softwarestruktur benötigt.

Für die Erstellung einer Softwarestruktur kann das EVA-Prinzip verwendet werden.

Hier kommt die Kurzform für eine Menueführung:

EINGABE: Knöpfe entprellen und Status merken
VERARBEITUNG: mit dem Knopfstatus entsprechende Funktionen ausführen.
AUSGABE: bei Änderungen die Inhalt der Anzeige auffrischen

Wobei sich die Menues über Datenstrukturen, für die xPos/yPos und Text, aufbauen lassen.

Viel Spass beim Programmieren in C++.

ok dank dir!
Dann schau ich mir mal das EVA-Prinzip an.
Vielleicht ist mir das aber noch zu hoch. Aber wer weiß :slight_smile:

Nein, brauchst Du nicht. Normalerweise sind while und do/while nicht notwendig, weil loop schon eine Schleife ist.

Bei Durchsicht Deines Programms gewinne ich den Eindruck, Du willst einen Zustand "festhalten". Dazu nutzt man eine Schrittkette (= finite state machine, = endlicher Automat). Ich nehme dazu gerne switch/case.

Laß eine LED als "Herzschlag" blinken. Schreibe dann ein Programm ohne Herzrhythmusstörungen.

Als LCD-Bibliothek empfehle ich Dir die NoiascaLiquidCrystal, mein Favorit für den deutschsprachigen Raum.

1 Like

Meinst du diese Vorgehensweise?

/* 17.09.2023
Grundmenü einer Ebene
mit 4 Zeilen
Fabian
*/
#include "LiquidCrystal_I2C.h"
LiquidCrystal_I2C lcd(0x27,20,4);


int upButton = 3;
int downButton = 4;
int selectButton = 5;
int menu = 1;

void setup() {
  lcd.init();
  lcd.backlight();
  pinMode(upButton, INPUT_PULLUP);
  pinMode(downButton, INPUT_PULLUP);
  pinMode(selectButton, INPUT_PULLUP);
  updateMenu();
}

void loop() {
  if (!digitalRead(downButton)){
    menu++;
    updateMenu();
    delay(100);
    while (!digitalRead(downButton));
  }
  if (!digitalRead(upButton)){
    menu--;
    updateMenu();
    delay(100);
    while(!digitalRead(upButton));
  }
  if (!digitalRead(selectButton)){
    executeAction();
    updateMenu();
    delay(100);
    while (!digitalRead(selectButton));
  }
}

void updateMenu() {
  switch (menu) {
    case 0:
      menu = 1;
      break;
    case 1:
      lcd.clear();
      lcd.print(">MenuItem1");
      lcd.setCursor(0, 1);
      lcd.print(" MenuItem2");
      lcd.setCursor(0, 2);
      lcd.print(" MenuItem3");
      lcd.setCursor(0, 3);
      lcd.print(" MenuItem4");
      break;
    case 2:
      lcd.clear();
      lcd.print(" MenuItem1");
      lcd.setCursor(0, 1);
      lcd.print(">MenuItem2");
      lcd.setCursor(0, 2);
      lcd.print(" MenuItem3");
      lcd.setCursor(0, 3);
      lcd.print(" MenuItem4");
      break;
    case 3:
      lcd.clear();
      lcd.print(" MenuItem1");
      lcd.setCursor(0, 1);
      lcd.print(" MenuItem2");
      lcd.setCursor(0, 2);
      lcd.print(">MenuItem3");
      lcd.setCursor(0, 3);
      lcd.print(" MenuItem4");
      break;
    case 4:
      lcd.clear();
      lcd.print(" MenuItem1");
      lcd.setCursor(0, 1);
      lcd.print(" MenuItem2");
      lcd.setCursor(0, 2);
      lcd.print(" MenuItem3");
      lcd.setCursor(0, 3);
      lcd.print(">MenuItem4");
      break;
    case 5:                           //Reihenfolge Case beachten
      menu = 4;                       //Sprung auf letzten aktiven Case
      break;
  }
}

void executeAction() {
  switch (menu) {
    case 1:
      action1();
      break;
    case 2:
      action2();
      break;
    case 3:
      action3();
      break;
    case 4:
      action4();
      break;
  }
}

void action1() {
  lcd.clear();
  lcd.print(">Executing #1");
  delay(1500);
}
void action2() {
  lcd.clear();
  lcd.print(">Executing #2");
  delay(1500);
}
void action3() {
  lcd.clear();
  lcd.print(">Executing #3");
  delay(1500);
}
void action4() {
  lcd.clear();
  lcd.print(">Executing #4");
  delay(1500);
}

Möglicherweise ja.

Melde mich später ab ca. 10 Uhr nochmal.