#include <LiquidCrystal.h>
LiquidCrystal lcd(18, 5, 17, 16, 4, 0);
const int tempPin = 14;
void setup()
{
Serial.begin(115200);
Serial.println("Hello");
lcd.begin(16, 2);
lcd.print("ADC Example");
delay(1000);
}
void loop()
{
int adc = analogRead(tempPin);
const float BETA = 3950.0; // should match the Beta Coefficient of the thermistor
float temp = 1 / (log(1 / (4096.0 / adc - 1)) / BETA + 1.0 / 298.15) - 273.15;
Serial.print("Temperature: ");
Serial.println(temp);
delay(2000);
}