Checks which muscles are activated and gives and output (left/right/keypress/rest)

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
woutende
Date:
Fri Oct 16 10:01:46 2015 +0000
Commit message:
Check_state first version. Pay attention to the fact that in the end the in- and output names have to change to work together properly

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 8aba349193ec main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Oct 16 10:01:46 2015 +0000
@@ -0,0 +1,34 @@
+#include "mbed.h"
+
+bool state_left = false;
+bool state_right = true;
+    
+int main()
+    {
+        if (state_left == true)
+            {
+                if (state_right == true)
+                    {
+                        std::string state = "keypress";
+                        std::cout << state;
+                    }
+                else 
+                    {
+                        std::string state = "left";
+                        std::cout << state;
+                    }
+            }
+        else 
+            {
+                if (state_right == true)
+                    {
+                        std::string state = "right";
+                        std::cout << state;
+                    }
+                else
+                    {
+                        std::string state = "rest";
+                        std::cout << state;
+                    }
+            }
+    }
\ No newline at end of file
diff -r 000000000000 -r 8aba349193ec mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Oct 16 10:01:46 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/34e6b704fe68
\ No newline at end of file