This is a very simple Project. In this I used following components:
- IR Sensor(Infrared Sensor)
- Liquid Crystal I2C Display
- Jumper Wires
- Arduino UNO
- BreadBoard
I had less materials so I used what I was having.
Code Explanation:
1.)Libraries for the Project#include <Wire.h>
#include <LiquidCrystal_I2C.h>
2.) Setting the LCD address
LiquidCrystal_I2C lcd(0x27,20,4);
3.)Setupvoid setup(){ lcd.init(); // initialize the lcd
lcd.init();
lcd.backlight();
lcd.clear();}
4.)Loopvoid loop(){
if(digitalRead(7)==0){
delay(1000);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("You are Safe!");}
if(digitalRead(7)==1){
lcd.setCursor(0, 0);
lcd.print("You are'nt Safe!"); }
Comments