mbed-classic on Bluepill

Dependencies:   mbed-STM32F103C8T6 mbed

Fork of Testato-mbed-dev-Bluepill by Testato Testato

Committer:
testato
Date:
Sat Sep 10 16:57:05 2016 +0000
Revision:
10:69c66b10784c
Parent:
9:d3fb631890d7
Child:
11:2cc880f72fc1
wait_ms

Who changed what in which revision?

UserRevisionLine numberNew contents of line
hudakz 5:3c3ef17a17a6 1 #include "stm32f103c8t6.h"
hudakz 0:ab218237069e 2 #include "mbed.h"
hudakz 8:f1432e9af6c8 3
testato 10:69c66b10784c 4 //Serial pc(PA_2, PA_3);
hudakz 5:3c3ef17a17a6 5 DigitalOut myled(LED1);
hudakz 8:f1432e9af6c8 6
hudakz 0:ab218237069e 7 int main() {
hudakz 0:ab218237069e 8 while(1) {
hudakz 5:3c3ef17a17a6 9 // The on-board LED is connected, via a resistor, to +3.3V (not to GND).
hudakz 3:c6a589f444b9 10 // So to turn the LED on or off we have to set it to 0 or 1 respectively
hudakz 7:accb2c83a007 11 myled = 0; // turn the LED on
testato 10:69c66b10784c 12 wait_ms(100); // 200 ms
hudakz 7:accb2c83a007 13 myled = 1; // turn the LED off
testato 10:69c66b10784c 14 wait_ms(100); // 1 sec
testato 10:69c66b10784c 15 //pc.printf("Blink\r\n");
hudakz 0:ab218237069e 16 }
hudakz 0:ab218237069e 17 }
hudakz 8:f1432e9af6c8 18