![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
PIR sensor test for the CORE-1000
Dependencies: mbed
Revision 6:405e47550c57, committed 2019-01-09
- Comitter:
- odb
- Date:
- Wed Jan 09 04:36:00 2019 +0000
- Parent:
- 4:c0ba73408d9e
- Commit message:
- PIR Sensor test for the CORE-1000
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r c0ba73408d9e -r 405e47550c57 main.cpp --- a/main.cpp Fri Feb 03 07:59:01 2017 +0000 +++ b/main.cpp Wed Jan 09 04:36:00 2019 +0000 @@ -1,14 +1,16 @@ #include "mbed.h" -DigitalIn enable(PC_13); - -int main() -{ +// DigitalIn enable(PC_13); //port change +//Serial pc(PA_11, PA_12); +DigitalIn enable(PD_2); +Serial pc(USBTX, USBRX); // tx, rx +int main() { + pc.baud(115200); while(1) { if(enable) { - printf("Passive Infread Ray Detected\n\r"); + pc.printf("Passive Infread Ray Detected\n\r"); wait(0.25); } }