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-blinky-15102018 by
main.cpp
00001 #include "mbed.h" 00002 00003 #define TSample 0.001 00004 #define Periode 300 00005 #define onTime 10 00006 00007 DigitalOut led(LED4); 00008 DigitalOut son(PA_7); 00009 //DigitalOut son(PA_1); 00010 00011 int wdt = 0; 00012 char msg[] = "Salut artiste"; 00013 Ticker TMainProcess; 00014 00015 void MainProcess_Isr(void){ 00016 --wdt; 00017 if((wdt< onTime)& (wdt> 0)){led= 1;}; 00018 if(wdt<= 0){led= 0; wdt= Periode;}; 00019 } 00020 00021 void init(void){ 00022 // son= 1; 00023 TMainProcess.attach(&MainProcess_Isr, TSample); 00024 son= 0; 00025 } 00026 00027 00028 // main() runs in its own thread in the OS 00029 int main(void) { 00030 led= 0; 00031 TMainProcess.attach(&MainProcess_Isr, TSample); 00032 while (true) {}; 00033 return 3; 00034 } 00035
Generated on Tue Aug 2 2022 07:50:55 by
1.7.2
