LiquidCrystal_I2C lcd(0x27,2,1,0,4,5,6,7);
LiquidCrystal_I2C lcd_1(0x26,2,1,0,4,5,6,7);
Do you count that way? When you feel the need to number variables in a set, number ALL of them.
#define lenght 16.0
Sppeling deos os matr.
In this case, though, use better names. One device displays a progress bar, so name the instance progressBar.
void Sensor_0(){
What a dumb name for a function. There is NOT a clue as to what kind of sensor or what this function does.
for (int i=1;i<a;i++) {
lcd.write(4);
b=i;
}
At the end of this loop, won't b have a fixed value (at least relative to a)?
a=a-b;
And what will a now be?
Convoluted logic to achieve a simple result is NOT a good thing.
peace=a*5;
switch (peace) {
case 0:
break;
case 1:
lcd.print(0);
break;
case 2:
lcd.print(1);
break;
case 3:
lcd.print(2);
break;
case 4:
lcd.print(3);
break;
}
Well, now we know where the 0, 1, 2, and 3 are coming from. Perhaps you meant to write() the special characters 0, 1, 2, and 3.