#include <LiquidCrystal.h>
//set kaki LCD RS E D4 D5 D6 D7
LiquidCrystal lcd(7, 6, 9, 10, 11, 12);
//set tipe data sensor suhu
float data, suhu;
float BETA = 3950;
int pSuhu = A0;
void setup() {
pinMode(pSuhu,INPUT);
Serial.begin(9600);
// choose LCD 16x2
lcd.begin(16,2);
lcd.setCursor(0,0);
lcd.print("HELLO WELCOME TO");
lcd.setCursor(3,1);
lcd.print("CETSORUGAM");
delay(1000);
lcd.clear();
}
void loop() {
data = analogRead(pSuhu);
suhu = 1 / (log(1 / (1023. / data - 1)) / BETA + 1.0 / 298.15) - 273.15;
lcd.setCursor(2,0);
lcd.print("Temp:");
lcd.print(suhu);
lcd.print(" C");
delay(500);
}