Interface temperature sensor, LCD and buzzer with Arduino UNO. Develop an Arduino sketch do follows: Display temperature on the LCD. If temperature is above 50 `C then sound the buzzer otherwise silent it. Temperature warning system.

Here i am using online IDE Tinkercad . If you don't know what is tinkercad then refer my blog HERE or else you can use offline IDE also.

Code:-

#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {

  lcd.begin(16, 2);

  Serial.begin(9600);

pinMode(9,OUTPUT);

}

void loop() {

float dout = analogRead(A0);

  float tv = (dout*5000)/1024.0;

  float tc = (tv/10)+(-50);

  lcd.print(tc);

  delay(1000);

  lcd.clear();

  if(tc>50){

                      digitalWrite(9,HIGH);  }

   }

Output :-



Comments

Popular Posts

What is Tinkercad ? How to use Tinkercad ?

Connect switch to Arduino. If switch is on than print ”ON” else print “OFF” on serial monitor.

Set the time using four switch and display the clock on LCD using arduino ** SW1 : when press, increment 1 digit ** SW2 : when press, decrement 1 digit ** SW3 : when press, display set time and start the clock ** SW4 : when press, reset the clock