I2C LCD dosen´t update

Hello,

I'm just start "playing" with arduino UNO water flow project.
So far I got the water flow sensor to work and to display on the serial monitor.

The problem is when I try to display on LCD. If I enable lcd.print() (see code), it stops to display on serial monitor and it doesn't update the LCD. Can someone help me?

float volume; //Variável para armazenar o valor Litros
int contaPulso; //Variável para a quantidade de pulsos
int i=0; //Variável para contagem
#include <Wire.h> 
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27,16,2);  // set the LCD address to 0x27 for a 16 chars and 2 line display

void setup()
{ 
  Serial.begin(9600); 
  pinMode(2, INPUT);
  attachInterrupt(0, incpulso, RISING); 
  Serial.println("\n\nInicio\n\n"); 
  
  lcd.init();                    
  lcd.backlight();
} 


void loop ()
{

  contaPulso = 0; 
  sei();      
  delay (1000); 
  cli();     
  
  volume = ((contaPulso/5.5)/60+volume);
  i++;
  
   Serial.print(volume); 
   Serial.println(" Litros "); 
  
  lcd.print(volume);


}
void incpulso ()
{ 
  contaPulso++;
}

Sorry for the bad English and silly question!! :wink:

Best Sylvio

The problem is that you are treating the LiquidCrystal_I2C library as if it were a functional module to operate a generic I2C LCD display.

It unfortunately isn't. It is essentially completely broken, quite useless. It is necessary to remove it from the IDE and replace it with the Fmalpartida library and then practice with some simple "Hello World" and counting exercises to become familiar with it. For example, you want to reset the cursor position each time you print a new value or it will become hopelessly confused.

At some stage, the maintainers of the IDE need to remove the non-functional library and substitute the Fmalpartida one. I have no idea why this has not been done some time ago.

Thank you Paul__B!