4653

Dependencies:   mbed-STM32F103C8T6 mbed USBDevice_STM32F103

Revision:
0:3cf5622d5b76
Child:
1:f9c784a35e9c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Jan 29 21:59:00 2018 +0000
@@ -0,0 +1,20 @@
+#include "stm32f103c8t6.h"
+#include "mbed.h"
+  
+int main() {
+    confSysClock();     //Configure system clock (72MHz HSE clock, 48MHz USB clock)
+    
+    Serial      pc(PA_2, PA_3);
+    DigitalOut  myled(LED1);
+    
+    while(1) {
+        // The on-board LED is connected, via a resistor, to +3.3V (not to GND). 
+        // So to turn the LED on or off we have to set it to 0 or 1 respectively
+        myled = 0;      // turn the LED on
+        wait_ms(200);   // 200 millisecond
+        myled = 1;      // turn the LED off
+        wait_ms(1000);  // 1000 millisecond
+        pc.printf("Blink\r\n");
+    }
+}
+ 
\ No newline at end of file