project for iot vives
Dependencies: mbed C12832 LM75B FXOS8700Q
Diff: StateMachine.h
- Revision:
- 0:3c9cd556e510
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/StateMachine.h Wed Nov 04 12:41:46 2020 +0000 @@ -0,0 +1,38 @@ +#ifndef STATEMACHINE_H +#define STATEMACHINE_H + +#include "mbed.h" +#include "LM75B.h" +#include "C12832.h" + +enum State {INIT, CLIENT, SERVER, CERROR}; + +class StateMachine { +private: + State currentState; + void actionInit(); + void actionClient(); + void actionServer(); + PwmOut* r; + PwmOut* g; + PwmOut* b; + AnalogIn* pot1; + AnalogIn* pot2; + DigitalIn* up; + DigitalIn* down; + DigitalIn* left; + DigitalIn* right; + + C12832* lcd; + + LM75B* sensor; + + DigitalOut* led; +public: + StateMachine(); + ~StateMachine(); + + void start(); +}; + +#endif \ No newline at end of file