richard misi
/
mbed-blinky-15102018
mbed blinky lpc1768
Fork of mbed-alone-blinky-lpc1768 by
Revision 0:473841607aa9, committed 2018-10-12
- Comitter:
- RCMISbed
- Date:
- Fri Oct 12 16:06:44 2018 +0000
- Commit message:
- blinky mbed
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r 473841607aa9 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Oct 12 16:06:44 2018 +0000 @@ -0,0 +1,35 @@ +#include "mbed.h" + +#define TSample 0.001 +#define Periode 300 +#define onTime 10 + +DigitalOut led(LED4); +DigitalOut son(p8); +//DigitalOut son(PA_1); + +int wdt = 0; +char msg[] = "Salut artiste"; +Ticker TMainProcess; + +void MainProcess_Isr(void){ + --wdt; + if((wdt< onTime)& (wdt> 0)){led= 1;}; + if(wdt<= 0){led= 0; wdt= Periode;}; + } + +void init(void){ + // son= 1; + TMainProcess.attach(&MainProcess_Isr, TSample); + son= 0; + } + + +// main() runs in its own thread in the OS +int main(void) { + led= 0; + TMainProcess.attach(&MainProcess_Isr, TSample); + while (true) {}; + return 3; +} +
diff -r 000000000000 -r 473841607aa9 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Oct 12 16:06:44 2018 +0000 @@ -0,0 +1,1 @@ +https://mbed.org/users/mbed_official/code/mbed/builds/22da6e220af6 \ No newline at end of file