Here is the hardware list:

  • Arduino Board
  • LCD Screen (compatible with Hitachi HD44780 driver)
  • Temperature sensor (LM35)
  • 100µF capacitor
  • breadboard
  • 22 Ω resistor
  • hook-up wires

lcd_temp_sensor

yigitaltay-454091825001097035_6011624
//Temperature Sensor LCD Display
#include <LiquidCrystal.h>

// defining lcd pins
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);

int pin_pwm = 9;

int valor_cc = 40;
// input pin for lm35 temp. sensor
int temp = A0;

float temperature;

void setup() {

lcd.begin(16,2);
lcd.clear();
Serial.begin(9600);
pinMode( pin_pwm, OUTPUT);
pinMode(temp, INPUT);

temperature=0;
}

void loop() {

Serial.println(temperature);

lcd.setCursor(0,0); //write to (first column, first row)
lcd.print(“yigitaltay.com”);
temperature = analogRead(temp);
temperature = temperature * 0.448; //temperature correction

lcd.setCursor(0,1); //write to (first column, second row)
lcd.print(“Temp:”);
lcd.print(temperature);
lcd.print(” C”);
}

 

 

Share this:

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.