Example code 02

Dependencies:   mbed

Fork of STMNucleoF401RE_ExampleCode_02_BlinkLED_ by 20161020-Corso Rapid Prototyping with STM32Nucleo

Revision:
0:7d5534bf57c3
Child:
2:1ab0a73dd25b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Oct 28 15:01:29 2015 +0000
@@ -0,0 +1,22 @@
+/****************************************************
+*            FAST PROTOTYPING WITH NUCLEO           *
+* Example Code 02: Blink Led                        *
+* Author: Mauro D'Angelo                            *
+* Organization: Perlatecnica no-profit organization *  
+*****************************************************/
+
+#include "mbed.h"
+
+//Instanzia una classe di tipo DigitalOut. L'instanza avra' nome myled e le viene assegnato il pin LED1
+DigitalOut myled(LED1);
+
+// Entry point
+int main() {
+    // Il Led lampeggia
+    while(1) {
+        myled = 1; // LED is ON
+        wait(0.2); // Attende 200 ms
+        myled = 0; // LED is OFF
+        wait(1.0); // Attende 1 sec
+    }
+}