void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
pinMode(14, INPUT_PULLUP);
}
void loop() {
int a=digitalRead(14);
Serial.println(a);
if(a==HIGH)
{
Serial.println("Motion detected!");
}
if(a==LOW)
{
Serial.println("Motion Not Detected!");
}
delay(1000); // this speeds up the simulation
}