#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 10, 9, 8, 7);
void setup() {
Serial.begin(9600);
pinMode(13, INPUT);
}
void loop() {
if (digitalRead(13)==HIGH)
{
Serial.println("Motion detected");
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Motion detected");
}
else
{
Serial.println("NO Motion detected");
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("NO Motion detected");
}
delay(500);
}