BULME_AHEL18 / Mbed 2 deprecated Bluetoothwheelcontrol

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
lukas__27
Date:
Tue Jun 16 13:51:20 2015 +0000
Commit message:
Bluetooth controlable Bertl14

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
diff -r 000000000000 -r 5845c99b6f59 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Jun 16 13:51:20 2015 +0000
@@ -0,0 +1,43 @@
+#include "mbed.h"
+
+Serial pc(p9, p10);
+
+PwmOut L(p34);
+DigitalOut LZ(P1_0);
+DigitalOut LV(P1_1);
+
+PwmOut R(p36);
+DigitalOut RV(P1_3);
+DigitalOut RZ(P1_4);
+
+int main()
+{
+    char c;
+    while(1) {
+        c = pc.getc();
+        if(c == 'v') {
+            LV = LZ = RV = RZ = 0;
+            L = R = 0;
+            LV = RV = 1;
+            L = R = 1.0f;
+        } else if(c == 'l') {
+            LV = LZ = RV = RZ = 0;
+            L = R = 0;
+            LZ = RV = 1;
+            L = R = 0.3f;
+        } else if(c == 'r') {
+            LV = LZ = RV = RZ = 0;
+            L = R = 0;
+            LV = RZ = 1;
+            L = R = 0.3f;
+        } else if(c == 'z') {
+            LV = LZ = RV = RZ = 0;
+            L = R = 0;
+            LZ = RZ = 1;
+            L = R = 1.0f;
+        } else if(c == 's') {
+            LV = LZ = RV = RZ = 0;
+            L = R = 0;
+        }
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r 5845c99b6f59 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Jun 16 13:51:20 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/7cff1c4259d7
\ No newline at end of file