Project tutorial
Arduino LCD Thermometer

Arduino LCD Thermometer © GPL3+

Upgraded project "Love'O Meter"

  • 1,261 views
  • 1 comment
  • 15 respects

Components and supplies

Apps and online services

About this project

Probably everyone knows project "Love'O meter" from the basic Arduino book. I decided to make it more useful so I added LCD display.

Code

The codeC/C++
It is easy: just copy to your Arduino IDE and upload to the controller
const int sensorPin = A0;
const float baselineTemp = 20.0;
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
  Serial.begin(9600);
  lcd.begin (16, 2);
  lcd.print("--Made By: KMB--");
  lcd.setCursor (0, 1);
  lcd.print(" Measuring Temp.");
  delay(5000);
}

void loop() {
  int sensorVal = analogRead(sensorPin);

  Serial.print("sensor Value: ");
  Serial.print(sensorVal);

  float voltage = (sensorVal / 1024.0) * 5.0;

  Serial.print(", Volts: ");
  Serial.print(voltage);

  Serial.print(", degrees C: ");
  float temperature = (voltage - .5) * 100;
  Serial.println(temperature);

  if (temperature < baselineTemp + 2) {
     lcd.begin (16, 2);
    lcd.print("Temperature:");
    lcd.setCursor(0, 1);
    lcd.print("Celsia:");
    lcd.setCursor(7, 1);
    lcd.print(temperature);
  } 
  else if (temperature >= baselineTemp + 2 && temperature < baselineTemp + 4) {
     lcd.begin (16, 2);
    lcd.print("Temperature:");
    lcd.setCursor(0, 1);
    lcd.print("Celsia:");
    lcd.setCursor(7, 1);
    lcd.print(temperature);
  } 
  else if (temperature >= baselineTemp + 4 && temperature < baselineTemp + 6) {
     lcd.begin (16, 2);
    lcd.print("Temperature:");
    lcd.setCursor(0, 1);
    lcd.print("Celsia:");
    lcd.setCursor(7, 1);
    lcd.print(temperature);
  } 
  else if (temperature >= baselineTemp + 6) {
    lcd.begin (16, 2);
    lcd.print("Temperature:");
    lcd.setCursor(0, 1);
    lcd.print("Celsia:");
    lcd.setCursor(7, 1);
    lcd.print(temperature);
  }
  delay(1000);
}

Schematics

The circuit
Sorry, I am still a beginner in this app.
Snimek obrazovky 2018 03 25 v13 fc19laxsvm
The circuit - download
thermometer_lcd_MFLbOeHjbb.fzz

Comments

Similar projects you might like

Making LCD Thermometer With Arduino And LM35/36

Project tutorial by Konstantin Dimitrov

  • 84,545 views
  • 19 comments
  • 72 respects

DHT11 Humidity + Temperature Sensor with 16x2 LCD display

Project showcase by onatto22

  • 22,243 views
  • 6 comments
  • 40 respects

Arduino LCD Video Game

Project tutorial by xXarduino_11Xx

  • 4,164 views
  • 1 comment
  • 18 respects

Easily Wire a 16x2 LCD

Project showcase by ThomTronics

  • 4,323 views
  • 0 comments
  • 13 respects

Ultrasonic Sensor with Alarm, LCD and Temperature

Project tutorial by MichDragstar

  • 10,604 views
  • 7 comments
  • 24 respects

LCD Thermometer With LEDs And Alarm Signal

Project showcase by GioMac

  • 7,064 views
  • 6 comments
  • 28 respects
Add projectSign up / Login