Sensore Infrarossi

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
DonatoSt
Date:
Tue Dec 18 22:29:51 2018 +0000
Commit message:
sensore infrarossi

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Dec 18 22:29:51 2018 +0000
@@ -0,0 +1,18 @@
+#include "mbed.h"
+
+DigitalOut myled(LED1);
+Serial pc(USBTX, USBRX);
+DigitalIn sense(D7);
+
+int main() {
+    while(1) {
+        if (!sense) 
+        pc.printf("\t Ostacolo trovato");
+          else 
+          pc.printf("\t Non ci sono ostacoli");
+        
+        wait_ms(500);
+    }
+  
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Dec 18 22:29:51 2018 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/0ab6a29f35bf
\ No newline at end of file