Checks which muscles are activated and gives and output (left/right/keypress/rest)
Dependencies: mbed
Diff: main.cpp
- Revision:
- 0:8aba349193ec
--- /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