Temperature Sensor with LCD

                 Once we figured out how to make the IC LM35 temperature sensor and how to install the LCD, let us combine the two so that a digital thermometer.

Arduino digital thermometer

Arduino digital thermometer


                 Combine the temperature sensor in Basic circuit to circuit 1602 series LCD above to form a new series. In this case, the circuit is ready to be programmed so that a digital thermometer.


Program termometer digital

// Free Tutorial Arduino
// www.ioisalman.com


// Digital thermometer

#include 

const int pSuhu = A0;
float temperature data;

// Setting LCD RS E D4 D5 D6 D7
LiquidCrystal lcd (7, 6, 9, 10, 11, 12);

void setup () {
   // Change to the internal reference voltage, 1.1 volts
   analogReference (INTERNAL);
   // PinSuhu as input
   pinMode (pSuhu, INPUT);
  
   // Select LCD 16 x 2
   lcd.begin (16.2);
   lcd.print ("WWW.IOISALMAN.COM");
}


void loop () {
   data = analogRead (pSuhu);
   temperature = Data * 110/1024;
  
   // Move to the column line 1 to line 2
   // Array always starts from 0
   lcd.setCursor (0.1);
   lcd.print ("Temperature");
   lcd.print (temperature);
   lcd.print ("C");
   delay (1000);
}

                 Congratulations, you can create a digital thermometer. Furthermore, we encourage you to be creative by changing the position or change the text in the LCD. Please also you try to do the conversion from Celsius to Fahrenheit, to Kelvin, and Reamur then displayed on the LCD.

Subscribe to receive free email updates:

0 Response to "Temperature Sensor with LCD"

Post a Comment