LCD cursor position select

Hello there
I’m new to the forum
I’m doing a small project. what i want to do is . write a number to LCD

example

if (setCursor(5, 0) < 3.32V) {

lcd.setCursor(0, 3);

lcd.print(“error”);
}

if the number is 2 and less than 3.2
error message

if (setCursor(5, 0) < 3.32V) {

The setCursor() function does not return the data to be displayed at that location. The setCursor() function does not return anything. Your number needs to be in a variable or constant.

if(number < 3.32)
{
  lcd.setCursor(5,0);
  lcd.print(number)
  //lcd.setCursor(0,3);
  //lcd.print("      ");  // spaces to overwrite LCD line 3 data
{
else
{
  lcd.setCursor(0,3);
  lcd.print("error");
  //lcd.setCursor(5,0);
  //lcd.print("      ");  // spaces to overwrite LCD line 0 data
}

You may want to clear one line when printing the other so they are not both visible at the same time (commented lines).

Since whatever is printed on the display is what your code already instructed to be printed, it clearly makes no sense to attempt to read it from the display. :astonished:

Ah, yes, another "XY Problem". :grinning:

How about just explaining what you actually want to do? :roll_eyes:

thanks for your help :slight_smile: