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

Committer:
halfpitch
Date:
Wed Jul 06 11:34:35 2011 +0000
Revision:
0:276797a4f4c3
Rev.A

Who changed what in which revision?

UserRevisionLine numberNew contents of line
halfpitch 0:276797a4f4c3 1 #include "mbed.h"
halfpitch 0:276797a4f4c3 2
halfpitch 0:276797a4f4c3 3 DigitalIn PIR(p20);
halfpitch 0:276797a4f4c3 4 DigitalOut checkLED(LED1);
halfpitch 0:276797a4f4c3 5
halfpitch 0:276797a4f4c3 6
halfpitch 0:276797a4f4c3 7 int main() {
halfpitch 0:276797a4f4c3 8 while(1) {
halfpitch 0:276797a4f4c3 9 checkLED = 0;
halfpitch 0:276797a4f4c3 10 if(PIR == 1) {
halfpitch 0:276797a4f4c3 11 checkLED = 1;
halfpitch 0:276797a4f4c3 12 }
halfpitch 0:276797a4f4c3 13 wait(0.25);
halfpitch 0:276797a4f4c3 14 }
halfpitch 0:276797a4f4c3 15 }