Example - 08 : Is Anybody Here? (PIR Motion Sensor)
WHAT ARE WE DOING HERE?
The following sketch demonstrates a simple application of sensing motion. When someone
moves in its detecting range, the output of the application will be high through its SIG0 pin and
the LED will turn on. Otherwise, the output will be LOW. Note that the PIR motion sensor is
very sensitive to motion!
THE CIRCUIT
● Grove-PIR Motion Sensor x1
● Grove cable x1
● Grove-Base BoosterPack x1
● LaunchPad Development Kit
Connections:
Plug the motion sensor module into Digital
Grove connector J14 on the BoosterPack.
This will link the SIG pin of the motion sensor
to pin 39 of the LaunchPad.
CODE
This example is available here:
File > Sketchbook > LaunchPad_Grove_Kit> pir_motion_sensor
Grove-PIR-Motion-Sensor
The following sketch demonstrates a simple application of sensing montion.
When someone moves in its detecting range, it will output High through its
SIG pin and the LED will light. Otherwise, it will output LOW. Then you can
use it to detect the motion of people.
The circuit:
* sig pin of the Grove-PIR-Motion-Sensor to pin39 (J14 plug on Grove Base BoosterPack)
* one side pin (either one) to ground
* the other side pin to +VCC
* LED anode (long leg) attached to RED_LED
* LED cathode (short leg) attached to ground
* Note: Position the trig jumper on N_Retrig to ensure
This example code is in the public domain.
http://www.seeedstudio.com/wiki/index.php?title=Twig_-_PIR_Motion_Sensor