Difference between revisions of "Sensor-PIR"
From Microduino Wiki
Line 3: | Line 3: | ||
|- | |- | ||
| | | | ||
− | [[File: Microduino-Passive Infrared.jpg|400px|thumb|right| | + | [[File: Microduino-Passive Infrared.jpg|400px|thumb|right| Sensor-PIR]] |
+ | |||
+ | The product number of Sensor-PIR is: '''MSDI51''' | ||
+ | |||
+ | Sensor-PIR is a pyroelectric infrared sensor that can detect infrared rays sent from moving human body or animals. It can output switch signals and be used in various occasions that need to detect moving human body. | ||
+ | |||
+ | |||
+ | ==Introduction of Pins== | ||
+ | {{Sensor_explain | ||
+ | |nameA=[[Sensor-PIR]] | ||
+ | |modeA=Digital read | ||
+ | |modeB=NC | ||
+ | }} | ||
− | |||
==Features== | ==Features== |
Revision as of 08:42, 10 November 2016
Language: | English • 中文 |
---|
The product number of Sensor-PIR is: MSDI51 Sensor-PIR is a pyroelectric infrared sensor that can detect infrared rays sent from moving human body or animals. It can output switch signals and be used in various occasions that need to detect moving human body.
ContentsIntroduction of Pins
Features
Specification
Document
DevelopmentEquipment
Preparation
Experiment: Detect If there is person moving
#define sensorPin 6
int state;
void setup()
{
pinMode(sensorPin, INPUT);
Serial.begin(9600);
}
void loop()
{
state = digitalRead(sensorPin);
if (state == 1)
Serial.println("Somebody is in this area!");
else
Serial.println("No one!");
delay(500);
}
When the PIR is detecting the moving persons, it'll output high level in the output pin, which is 5V. And when it detected the PIR signal gone, it'll output low level(0V) after 2.3-3s delay. Therefore, we can according to that to establish a moving person detection project according to that. Program Debugging
Application
ProjectPurchaseHistoryImage
|