Difference between revisions of "Sensor-PIR"
From Microduino Wiki
(→Features) |
|||
Line 22: | Line 22: | ||
*With high precision and sensitivity. | *With high precision and sensitivity. | ||
*Low power consumption, long service life and good stability. | *Low power consumption, long service life and good stability. | ||
− | |||
*Digital signals | *Digital signals | ||
− | *Small size and easy to install. | + | *Small size and easy to install. |
− | + | ||
==Specification== | ==Specification== | ||
*Electrical specification | *Electrical specification |
Revision as of 08:43, 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
|