Mess on the LCD menu <solved>

Hi
How to get rid of the mess on the LCD?
I have it on all cases .

  // ++++++++++++++++++++++++++++++++  menu ++++++++++++++++++++++++++++++++
  if (digitalRead(PA15) == 0)
  {
    // botonState = (botonState + 1) % 3;
    botonState = (botonState + 1) % 7;
    delay (200);
  }

  // lcd.print("               ");
  //display.setCursor(0, 0);
  // lcd.setCursor(0, 0);

  lcd.setCursor(0, 0);
  switch (botonState)
  {
    case 0:                                  // VDI
      lcd.print("#0 VDI ");
      lcd.setCursor(8, 0);
      lcd.print("min ");
      lcd.setCursor(8, 0);
      lcd.print("min ");
      lcd.setCursor(12, 0);
      lcd.print("max");
      break;

    case 1:                            //Ubal, amp, shift
      lcd.print("#1 B ");
      lcd.print(UbalmV, 0);
      lcd.print("         ");
      lcd.setCursor(0, 1);
      lcd.print("a ");
      lcd.print( amp    );
      lcd.setCursor(10, 1);
      lcd.print("f ");
      lcd.print( shift);
      digitalWrite(PC13, LOW);
      digitalWrite(PA7,  HIGH);
      digitalWrite(PB0, HIGH);
      break;

    case 2:                                 // Threshold
      //lcd.print("         ");
      lcd.print("#2 M ");           //  2
      lcd.println(Magn);         // PA1,PA2
      lcd.setCursor(10, 0);
      lcd.print("T ");           //  48
      lcd.println(t);
      lcd.setCursor(0, 1);
      lcd.print("                 ");
      digitalWrite(PC13, HIGH);
      digitalWrite(PA7, LOW);
      digitalWrite(PB0, HIGH);
      //lcd.println( "                                   ");
      break;

    case 3:                            // Z
      lcd.print("#3 Z ");
      lcd.println(z);
      digitalWrite(PC13, HIGH);
      digitalWrite(PA7, HIGH);
      digitalWrite(PB0, LOW);

      break;
    case 4:                         // AV, A
      lcd.print("#4 V");
      lcd.println( "volt");
      lcd.print("A");
      lcd.println( "amp");
      break;
      
    case 5:
      lcd.print("#5  ");           //spare
      lcd.print(" spare  ");

      break;
    case 6:
      lcd.print(" #6 spare 2");        //  spare 2
      break;

      lcd.print("                                                               ");
      //break;

  }
  // ++++++++++++++++++++++++++++++++++++++++++++++++


On LCD should be
#4 Volt Amp
instead of
#4 Volt??xx Amp xx??

Which mess?

Hello tom321

We need some additional information.
Post your complete sketch, well formated, with well-tempered comments and in so called code tags "< code >" , a real schematic and a picture of the solderings of the LCD to see how we can help.

Have a nice day and enjoy coding in C++.

Do not use println(). The println function is not supported by any of the LiquidCrystal libraries.

Thanks ,problem solved.

If your question has been answered to your satisfaction, please mark the thread as solved so that other members that wish to help will not waste their time opening the thread only to find that you no longer require assistance.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.