Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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 |
--- 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); } }