*** ***

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
knut_johan
Date:
Fri Oct 09 15:10:50 2015 +0000
Commit message:
l?reboka

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	Fri Oct 09 15:10:50 2015 +0000
@@ -0,0 +1,13 @@
+#include "mbed.h"
+
+DigitalOut  redled(PA_5);
+DigitalIn opto_switch(PB_7);
+
+int main()
+{   while(1);       {           // while loop
+        if (opto_switch==1)     // input = 1 if beam interupted
+            redled=1;           //  -> switch led on
+        else                    // input = 0 if beam NOT interupted
+            redled=0;           // -> switch led OFF
+                    }           // end while loop
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Oct 09 15:10:50 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/34e6b704fe68
\ No newline at end of file