Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed QEI HIDScope biquadFilter MODSERIAL FastPWM
Diff: main.cpp
- Revision:
- 9:cb88b16a97d5
- Parent:
- 8:ccd58f78b5cb
- Child:
- 10:ad2da21a102c
--- a/main.cpp Tue Oct 01 13:56:14 2019 +0000 +++ b/main.cpp Wed Oct 02 07:41:41 2019 +0000 @@ -6,9 +6,11 @@ DigitalOut ledg(LED_GREEN); DigitalOut ledr(LED_RED); -enum States {MovementIdle, CalibrationIdle, Demo, Startup, CalibrationPhysical, Move, TiltCup, FailState}; +enum States {MovementIdle, CalibrationIdle, Demo, Startup, CalibrationPhysical, CalibrationEMG, Move, TiltCup, FailState}; States CurrentState; +Ticker Main_Ticker; + char ledcolor; //r is red, b is blue, g is green, t is bluegreen, p is purple Ticker Tick_Blinky;//used for the blinking of the leds @@ -111,7 +113,7 @@ Run_CalibrationIdle; ledcolor='b'; break; - case Startup; + case Startup: Run_Startup; ledcolor='b'; break; @@ -141,7 +143,7 @@ //Main Loop void mainloop() { - Statemachine(); + StateMachine(); } int main() @@ -150,7 +152,8 @@ Tick_Blinky.attach(FlipLED,1); CurrentState = Startup; - + Main_Ticker.attach(mainloop,2); + while(true) {