Mini Infrared Sensor (PIR)

Mini Infrared Sensor (PIR)

Regular price R 50.00

Passive Infrared Sensors can signal a microcontroller upon the motion of infrared wavelengths in their detection perimeter.

Perfect for a small projects like proximity light switches, or motion detection for security applications.  Very low current usage.

 

Input voltage: DC 4.5-20V

Output voltage: High 3.3V/Low 0V

Detection angle: 100°

Induction distance: Up to 3m

 

 

Example Code:  The results show a ~20 second activation of '1' when a hand is waved in front of it... followed by a reset to '0'

 


const int pirPin = 3;     // the number of the pushbutton pin
int state = 0;

void setup() {
  // initialize the LED pin as an output:
  pinMode(pirPin, INPUT);
  Serial.begin(9600);

}

void loop() {

  state = digitalRead(pirPin);
  Serial.println(state);
  delay(1000);
}