mbed blinky lpc1768

Dependencies:   mbed

Files at this revision

API Documentation at this revision

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
--- /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;
+}
+
--- /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