PIR sensor test for the CORE-1000

Dependencies:   mbed

Files at this revision

API Documentation at this revision

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);
         }
     }