// #include <ESP32Servo.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup()
{
Wire.begin(19, 18);
Serial.begin(115200);
lcd.init();
lcd.backlight();
}
void loop()
{
const float BETA = 3950;
int analogValue = analogRead(34);
float celsius = 1 / (log(1 / (4095. / analogValue - 1)) / BETA + 1.0 / 298.15) - 273.15;
int temp = static_cast<int>(celsius);
lcd.clear();
Serial.print("Temperature: ");
Serial.println(temp);
lcd.setCursor(2, 0);
lcd.print("Temperature:");
lcd.setCursor(6, 1);
lcd.print(temp);
// lcd.setCursor(10, 1);
lcd.print(" C");
delay(1000);
}