I'm trying to display the variable "i" instantaneously on the lcd as shown in the code, but the code keeps displaying i=0, without changing. I've done all the lcd setup required, and included all the necessary libraries for displaying, yet the value of i does not change in the lcd display. Please I need help with it, cos if i cant see what i'm varying i cant tell whether it's actually varying.
for (int i = 0; i <= 255; i++)
{
lcd.setCursor(0, 0);
lcd.print(i);
delay(10);
}
delay(500);
for (int i = 255; i >= 0; i--)
{
lcd.setCursor(0, 0);
lcd.print(i);
delay(10);
}
return i;
}