#include <LiquidCrystal.h>
const float BETA = 3950; // should match the Beta Coefficient of the thermistor
const int rs = 12, en = 11, d4 = 10, d5 = 9, d6 = 8, d7 = 7;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
void setup() {
lcd.begin(16, 2);
lcd.print("hello, world!");
delay(2000);
lcd.clear();
}
void loop() {
int analogValue = analogRead(A0);
float celsius = 1 / (log(1 / (1023. / analogValue - 1)) / BETA + 1.0 / 298.15) - 273.15;
lcd.setCursor(2,0);
lcd.print("Temperatura");
lcd.setCursor(1,1);
lcd.print(celsius);
lcd.println(" ℃");
delay(3000);
int analogValue1 = analogRead(A1);
float celsius1 = 1 / (log(1 / (1023. / analogValue1 - 1)) / BETA + 1.0 / 298.15) - 273.15;
lcd.setCursor(2,0);
lcd.print("Temperatura");
lcd.setCursor(1,1);
lcd.print(celsius1);
lcd.println(" ℃");
delay(3000);
int analogValue2 = analogRead(A2);
float celsius2 = 1 / (log(1 / (1023. / analogValue2 - 1)) / BETA + 1.0 / 298.15) - 273.15;
lcd.setCursor(2,0);
lcd.print("Temperatura");
lcd.setCursor(1,1);
lcd.print(celsius2);
lcd.println(" ℃");
delay(3000);
}