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-dsp
Fork of mbed-os-example-blinky by
Diff: main.cpp
- Revision:
- 44:7f2c1e8d0761
- Parent:
- 39:c92c150c0dd2
- Child:
- 45:b1b431753adc
diff -r c92c150c0dd2 -r 7f2c1e8d0761 main.cpp --- a/main.cpp Wed Mar 29 13:57:11 2017 +0000 +++ b/main.cpp Wed Mar 29 15:06:01 2017 +0000 @@ -2,12 +2,31 @@ DigitalOut led1(LED1); +// State machine +int STATE; +const int NONE = -1; +const int TEST = 0; +const int SEND = 1; +const int DSP1 = 2; +const int DSP2 = 3; +const int DSP3 = 4; +const int WAIT = 9; + // main() runs in its own thread in the OS int main() { + STATE = NONE; while (true) { - led1 = !led1; - //ändrade värdet från 0.5 till 0.6 - wait(2); + switch (STATE) { + + case SEND: + //send code here + break; + + case TEST: + //code here + break; + + } } } //Calculating distanse between sound and camera