i want to add the max temp and min temp to my arduino thermometer.
but i do not know how to.
please modify my code so it works.
#include <LiquidCrystal.h>
LiquidCrystal lcd(8,9,4,5,6,7);
void setup()
{
pinMode(3,INPUT); //setting arduino pin3 as input
Serial.begin(9600); // opens serial port, sets data rate to 9600 bps
lcd.begin(16,2);
int sensorPin = 0;
}
void loop() // run over and over again
{
//getting the voltage reading from the temperature sensor
int reading = analogRead(sensorPin);
// converting that reading to voltage, for 3.3v arduino use 3.3
float voltage = reading * 5.0;
voltage /= 1024.0;
// now print out the temperature
float temperatureC = (voltage - 0.5) * 100 ; //converting from 10 mv per degree wit 500 mV offset
//to degrees ((voltage - 500mV) times 100)
Serial.print(temperatureC);
Serial.println(" degrees C");
delay(1); //waiting a second
Serial.print("temperature= ");
Serial.println(temperatureC);
lcd.setCursor(0,0);
lcd.print("Temp = ");
lcd.print(temperatureC);
lcd.print((char)223);
lcd.print("C");
delay(250);
}