// LCD1602 to Arduino Uno connection example
#include <LiquidCrystal.h>
String entry;
const int rs=12,en=11,d4=5,d5=4,d6=3,d7=2;
LiquidCrystal lcd(rs,en,d4,d5,d6,d7);
void setup() {
// set up the LCD's number of columns and rows:
Serial.begin(115200);
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("hello, world!");
}
void loop() {
// read the input on analog pin 0:
int sensorValue = analogRead(A0);
// Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):
float voltage = sensorValue * (5.0 / 1023.0);
float temperature = voltage*100;
// print out the value you read:
Serial.println("Voltage : ");
Serial.println(voltage);
Serial.println("Temperature : ");
Serial.println(temperature);
lcd.setCursor(0,0);
lcd.print(" ");
lcd.setCursor(0,0);
lcd.print("T :");
lcd.print(temperature);
lcd.print((char)223);
lcd.print("C");
delay(500);
}