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 SerialInputReactionHandler AMPulseTrain SwArr16MOSFET StrCommandHandler KajiLabES
main.cpp
- Committer:
- aktk
- Date:
- 2019-11-27
- Revision:
- 2:5cb68cc8ecaa
- Parent:
- 1:b97639dad576
File content as of revision 2:5cb68cc8ecaa:
#include "mbed.h" #include "subroutines.h" DigitalOut myled1(LED1); DigitalOut myled2(LED2); DigitalOut myled3(LED3); DigitalOut myled4(LED4); ProcessState pstate = WAIT_A_CERTAIN_KEY; int main() { printf("SystemCoreClock = %d Hz\n", SystemCoreClock); myled1 = myled2 = myled3 = myled4 = 0; init(); PRELOOP_POINT: while (pstate == WAIT_A_CERTAIN_KEY) { wait(0.5); myled3 = (!myled3); } myled3 = 1; while(pstate == MAIN_ROUTINE) { wait(.1); myled3 = (!myled3); } myled3 = 0; goto PRELOOP_POINT; }