Here, I am trying that when my IR sensor catches signal, It would us NodeMCU v3 to sent SMS/EMAIL/Telegram but I was unable to use NodeMCU with my Arduino.
int IRSensor = 9;
void setup() {
pinMode(9, INPUT);
Serial.begin(9600);
}
void loop() {
int sensorStatus = digitalRead(IRSensor); // Set the GPIO as Input
if (sensorStatus == 1) // Check if the pin high or not
{
Serial.println("Motion Detected!");
delay(1000);
}
else {
Serial.println("Motion Ended!");
delay(1000);
}
}


