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.
Dependencies: mbed
Diff: main.cpp
- Revision:
- 0:40477eb0350c
- Child:
- 1:b63700fbbf1f
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Mon Feb 22 13:04:31 2016 +0000
@@ -0,0 +1,33 @@
+/*LAB_LED*/
+#include "mbed.h"
+
+//LED1 = D13 = PA_5 (LED on Nucleo board)
+DigitalOut led1(LED1);
+DigitalOut led2(D12);
+DigitalOut led3(D11);
+
+Ticker timer1;
+
+void init_IO(void){
+ led1 = 0;
+ led2 = 1;
+ led3 = 1;
+}
+
+void timer1_interrupt(){
+ ;
+}
+
+void init_TIMER(void){
+ timer1.attach_us(&timer1_interrupt, 1000.0);//1ms interrupt period (1 KHz)
+}
+
+int main() {
+
+ init_IO();
+ init_TIMER();
+
+ while(1) {
+ ;
+ }
+}
\ No newline at end of file