PIR sensor test for the CORE-1000

Dependencies:   mbed

Committer:
odb
Date:
Wed Jan 09 04:36:00 2019 +0000
Revision:
6:405e47550c57
Parent:
4:c0ba73408d9e
PIR Sensor test for the CORE-1000

Who changed what in which revision?

UserRevisionLine numberNew contents of line
screamer 0:005629fe3609 1 #include "mbed.h"
screamer 0:005629fe3609 2
odb 6:405e47550c57 3 // DigitalIn enable(PC_13); //port change
odb 6:405e47550c57 4 //Serial pc(PA_11, PA_12);
odb 6:405e47550c57 5 DigitalIn enable(PD_2);
odb 6:405e47550c57 6 Serial pc(USBTX, USBRX); // tx, rx
odb 6:405e47550c57 7 int main() {
odb 6:405e47550c57 8 pc.baud(115200);
odb 4:c0ba73408d9e 9 while(1)
odb 4:c0ba73408d9e 10 {
odb 4:c0ba73408d9e 11 if(enable)
odb 4:c0ba73408d9e 12 {
odb 6:405e47550c57 13 pc.printf("Passive Infread Ray Detected\n\r");
odb 4:c0ba73408d9e 14 wait(0.25);
odb 4:c0ba73408d9e 15 }
screamer 0:005629fe3609 16 }
odb 4:c0ba73408d9e 17 }