Quantity | 3+ units | 10+ units | 30+ units | 50+ units | More |
---|---|---|---|---|---|
Price /Unit | $8.49 | $8.31 | $8.05 | $7.71 | Contact US |
ITEAD Small Body Infrared Sensor Infrared Module Tiny PIR 4P 3P Interface for Arduino 2-Pack
Specification:
- Input voltage: DC4.5-20V
- Static power consumption: 50 microamps
- Output signal: 0.3V or 5V
- Trigger modes: h for repeatable, l is not repeatable
- Repeat period: fixed 2.5s, not adjustable
Max monitoring range is 120 degrees to 5 meters.
Infrared module + buzzer, DIY burglar alarm!
int BUZZERPin = 13; LED connected to the digital port 13
int sensor = 2; Sensors connected to the digital port 2
Pyroelectric infrared motion sensor sent a high level, it is triggered
Send low level, it's in hibernation
int val = 0; Store sensor digital
void setup()
{
pinMode(BUZZERPin, OUTPUT); sets the digital pin as output
pinMode(sensor, INPUT); sets the digital pin as input
digitalWrite(BUZZERPin,HIGH); Initialize to turn off the light
Serial.begin (9600);//sets the baud rate of serial communication
}
void loop()
{
val = digitalRead(sensor); read the input pin
Pyroelectric infrared motion sensor is triggered, will remain high for some time
if(HIGH == val)
{
Serial.write (1);//send sensor to Processing is triggered flag
digitalWrite(BUZZERPin,LOW); LED light
Delay (100);//delay to enable serial communication is not too busy
}
else
{digitalWrite(BUZZERPin,HIGH); LED out
Serial.write ((byte) 0);//send sensor to Processing dormant flags
delay(100);
}
}
Package included:
- 2 x Infrared Sensor