#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd1(0x27,20,4); // set the LCD address to 0x27 for a 16 chars and 2 line display
LiquidCrystal_I2C lcd2(0x28,20,4); // set the LCD address to 0x28 for a 16 chars and 2 line display
const float BETA = 3950; // should match the Beta Coefficient of the thermistor
void setup()
{
lcd1.init(); // initialize the lcd
lcd2.init(); // initialize the lcd
// Print a message to the LCD.
lcd1.backlight();
lcd1.setCursor(3,0);
lcd1.print("Hello!");
lcd2.backlight();
lcd2.setCursor(3,0);
lcd2.print("Temp");
}
void loop() {
// put your main code here, to run repeatedly:
int analogValue = analogRead(A0);//считали А0
float celsius = 1 / (log(1 / (1023. / analogValue - 1)) / BETA + 1.0 / 298.15) - 273.15;
lcd2.setCursor(3,1);
lcd2.print(celsius);
}