Bertl_SensorLed

Dependencies:   BertlLib mbed

Files at this revision

API Documentation at this revision

Comitter:
Wizo
Date:
Thu Nov 15 17:24:18 2018 +0000
Commit message:
Bertl_SensorLed

Changed in this revision

BertlLib_copy.lib Show annotated file Show diff for this revision Revisions of this file
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/BertlLib_copy.lib	Thu Nov 15 17:24:18 2018 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/hollegha2/code/BertlLib/#20c3213c3ada
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Nov 15 17:24:18 2018 +0000
@@ -0,0 +1,38 @@
+#include "mbed.h"
+#include "Serial_HL.h"
+#include "Bertl14.h"
+#include "BertlObjects.h"
+
+//              main=2^0  LS    ENC 2^2
+BusOut boardPow(p30,      P1_6, P1_7);
+BusOut leds1(LED1,LED2,LED3,LED4);
+
+// ls5 nur beim Betrl15
+// AnalogInHL ls1(p18), ls2(p16), ls3(p19), ls4(p17); // B14
+
+AnalogInHL ls1(p18), ls2(p16), ls3(p20), ls4(p19), ls5(p17); // B15
+
+
+
+int main(void)
+{
+    boardPow=3; wait_ms(10);        // boardPow = 3!
+    InitBertl();
+    
+    while(1)
+    {
+        pex.ReadButtons();
+        if(ls1.Read()>600 && pex.IsButton(BTN_FLL))
+        leds1 = 1;
+        if(ls2.Read()>600 && pex.IsButton(BTN_FL))
+        leds1 = 2;
+        if(ls4.Read()>600 && pex.IsButton(BTN_FR))
+        leds1 = 4;
+        if(ls5.Read()>600 && pex.IsButton(BTN_FRR))
+        leds1 = 8;
+        else
+        leds1 = 0;
+    }
+    
+    return 1;
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Nov 15 17:24:18 2018 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/5aab5a7997ee
\ No newline at end of file