PIR sensor for White Wizard Board (PAT.PEND). Base Board Ditail : http://wizard.nestegg.jp/ Sensor module Detail : http://wizard.nestegg.jp/pir.html

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 
00003 DigitalIn PIR(p20);
00004 DigitalOut checkLED(LED1);
00005 
00006 
00007 int main() {
00008     while(1) {
00009         checkLED = 0;
00010         if(PIR == 1) {
00011             checkLED = 1;
00012         }
00013         wait(0.25);
00014     }
00015 }