#include <LiquidCrystal.h>
LiquidCrystal lcd(7,6,5,4,3,2);
void setup() {
pinMode(A0, INPUT);
lcd.begin(16,2);
}
void loop() {
int temp = analogRead(A0);
float voltage = temp * (5.0 / 1023.0);
// Convert the voltage to temperature (for LM35, 10mV per degree)
float temperatureC = voltage * 100; // LM35: 1°C = 10mV
lcd.clear();
lcd.print("Temp: ");
lcd.print(temperatureC);
lcd.print(" C");
delay(1000);
}