Hw-416-b Pir Sensor Datasheet !free!

The output goes high once motion is detected and stays high for the set delay time, then goes low regardless of continued motion.

void loop() if(digitalRead(pirPin) == HIGH) digitalWrite(ledPin, HIGH); Serial.println("Motion detected!"); delay(1000); else digitalWrite(ledPin, LOW); hw-416-b pir sensor datasheet

Based on the datasheet’s application hints: The output goes high once motion is detected

The HW-416-B typically operates on low-voltage DC and provides a digital output signal compatible with microcontrollers like Arduino, ESP32, and Raspberry Pi. hw-416-b pir sensor datasheet

Confirm your board’s marking – some HW-416-B variants swap the naming.