mbed-classic on Bluepill

Dependencies:   mbed-STM32F103C8T6 mbed

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

main.cpp

Committer:
hudakz
Date:
2016-07-02
Revision:
4:a81f44fc487e
Parent:
3:c6a589f444b9
Child:
5:3c3ef17a17a6

File content as of revision 4:a81f44fc487e:

#include "PinNames.h"   // Pin name definitions for the STM32F103C8T6 board
#include "mbed.h"

DigitalOut myled(LED1);

int main() {
    while(1) {
        // The on-board LED is connected, via a resistor, to +3.3V (instead of 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(0.2); // 200 ms
        myled = 1; // turn the LED off
        wait(1.0); // 1 sec
    }
}