//Igor M.Raichel
#include <LiquidCrystal.h>
#define sensorPin A3
const int rs = 8, en = 9, d4 = 4, d5 = 5, d6 = 6, d7 = 7;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
byte Degree[] = {
B00111,
B00101,
B00111,
B00000,
B00000,
B00000,
B00000,
B00000
};
byte customChar[8] = {
0b00100,
0b01010,
0b01010,
0b01010,
0b01010,
0b10001,
0b11111,
0b01110
};
void setup()
{
lcd.clear(); // limpa a tela
lcd.createChar(0, customChar); // criando o caracter especial 1
lcd.begin(16, 2);
lcd.setCursor(15,0);
lcd.write((uint8_t)0);
lcd.createChar(1, Degree);
}
void loop()
{
int valor = analogRead(sensorPin);
float vout = valor * (5.0 / 1024.0);
float temp = vout * 100;
lcd.setCursor(3, 0);
lcd.print("Temp");
lcd.setCursor(3, 1);
lcd.print(temp,1);
lcd.setCursor(7,1);
lcd.write(1);
lcd.print("C");
delay(1000);
}