Using low cost Bluepill (STM32F103C8T6) boards with mbed.

Dependencies:   mbed

Dependents:   STM32F103C8T6_Chicharronera_4CV2 STM32F103C8T6_Portada

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 
00003 Serial      pc(PA_2, PA_3); // TX, RX
00004 DigitalOut  myled(PC_13);   // on-board LED
00005   
00006 int main() 
00007 {  
00008     while(1) {
00009         // The on-board LED is connected via a resistor to +3.3V (not to GND). 
00010         // So the LED is active on 0
00011         myled = 0;      // turn the LED on
00012         wait_ms(200);   // wait 200 millisecond
00013         myled = 1;      // turn the LED off
00014         pc.printf("Blink\r\n");
00015         wait_ms(1000);  // wait 1000 millisecond
00016     }
00017 }