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.
Fork of mbed-os-example-mbed5-blinky by
main.cpp
00001 #include "mbed.h" 00002 00003 #define TSample 0.001 00004 #define Periode 700 00005 #define onTime 10 00006 00007 DigitalOut led(LED4); 00008 DigitalOut son(p8); 00009 00010 int wdt = 0; 00011 00012 Ticker TMainProcess; 00013 00014 void MainProcess_Isr(){ 00015 --wdt; 00016 if((wdt< onTime)& (wdt> 0)){led= 1;}; 00017 if(wdt<= 0){led= 0; wdt= Periode;}; 00018 } 00019 00020 void init(void){ 00021 son= 0; 00022 TMainProcess.attach(&MainProcess_Isr, TSample); 00023 } 00024 00025 00026 // main() runs in its own thread in the OS 00027 void main() { 00028 init(); 00029 while (true) {}; 00030 } 00031
Generated on Tue Jul 12 2022 21:25:19 by
1.7.2
