const int pinRelay = 2;
int gerak=3;
int statusGerak=0;
void setup() {
  Serial.begin(9600);
  Serial.println("Sensor Pendeteksi Gerak");
  pinMode(pinRelay, OUTPUT);

}

void loop() {
  statusGerak = digitalRead(D3);
  if(statusGerak == HIGH){
    digitalWrite(pinRelay, HIGH);
    Serial.println("Ada Gerakan");
    Serial.print(statusGerak);
  }
  else
  {
    digitalWrite(pinRelay, LOW);
    Serial.println("Tidak Ada Gerakan");
    Serial.print(statusGerak);

  }
  delay(1000);
}
NOCOMNCVCCGNDINLED1PWRRelay Module