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

main.cpp

Committer:
halfpitch
Date:
2011-07-06
Revision:
0:276797a4f4c3

File content as of revision 0:276797a4f4c3:

#include "mbed.h"

DigitalIn PIR(p20);
DigitalOut checkLED(LED1);


int main() {
    while(1) {
        checkLED = 0;
        if(PIR == 1) {
            checkLED = 1;
        }
        wait(0.25);
    }
}