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.
main.cpp
00001 #include "mbed.h" 00002 00003 #define TSample 0.001 00004 #define Periode 900 00005 #define onTime 10 00006 00007 DigitalOut led(LED1); 00008 DigitalOut son(p8); 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 Mon Jul 18 2022 03:22:51 by
1.7.2