#include <LiquidCrystal.h>
int seconds = 0;
LiquidCrystal lcd_1(12, 11, 5, 4, 3, 2);
int mPin = A0;
int mVal;
float tem;
void setup()
{
lcd_1.begin(16, 2); // Set up the number of columns and rows on the LCD.
Serial.begin(9600);
}
void loop()
{
mVal = analogRead(mPin);
tem = mVal * 5000 / 1024;
tem = tem / 10;
tem = tem - 50;
lcd.setCursor(5, 0);
lcd.print("LM 35");
lcd.setCursor(0,1);
lcd.print("Temp=");
lcd.setCursor(6,1);
lcd.print(tem);
lcd.print("°C");
Serial.print("temperatura: ");
Serial.println(tem);
delay(1000);
}