kh
Dependencies: mbed PinDetect Servo
Diff: main.cpp
- Revision:
- 2:04bbd14722bd
- Parent:
- 1:2c365f6da61d
- Child:
- 3:2f7a7e2cd49e
diff -r 2c365f6da61d -r 04bbd14722bd main.cpp --- a/main.cpp Sat Nov 10 20:08:46 2018 +0000 +++ b/main.cpp Mon Nov 12 23:36:11 2018 +0000 @@ -6,10 +6,13 @@ #include "open.h" #include "lock.h" #include "setup.h" -#include "sleep.h" #include "parameters.h" +#include "authentication.h" + +enum states state = SETUP; + /* * Function: SafeStateMachine * -------------------- @@ -18,11 +21,8 @@ * * */ -void SafeStateMachine() { - - - enum states state = SETUP; - +void SafeStateMachine() +{ while (1) { switch (state) { case OPEN:/*state in which the the case is open*/ @@ -37,12 +37,15 @@ default: state = lock(); } + wait(.5); } } int main() { + start_bluetooth(); SafeStateMachine(); } +