STM32F103C8T6_Internal_RTC
Dependencies: mbed-STM32F103C8T6 mbed
Fork of STM32F103C8T6_GPRS_TCP by
main.cpp@3:c6a589f444b9, 2016-07-02 (annotated)
- Committer:
- hudakz
- Date:
- Sat Jul 02 07:51:56 2016 +0000
- Revision:
- 3:c6a589f444b9
- Parent:
- 1:1dd12d8c840d
- Child:
- 4:a81f44fc487e
Updated
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
hudakz | 1:1dd12d8c840d | 1 | #include "PinNames.h" // Pin name definitions for the STM32F103C8T6 board |
hudakz | 0:ab218237069e | 2 | #include "mbed.h" |
hudakz | 0:ab218237069e | 3 | |
hudakz | 0:ab218237069e | 4 | DigitalOut myled(LED1); |
hudakz | 0:ab218237069e | 5 | |
hudakz | 0:ab218237069e | 6 | int main() { |
hudakz | 0:ab218237069e | 7 | while(1) { |
hudakz | 3:c6a589f444b9 | 8 | // The on-board LED is connected to pin PC_13 and, via a resistor, to +3V3. |
hudakz | 3:c6a589f444b9 | 9 | // So to turn the LED on or off we have to set it to 0 or 1 respectively |
hudakz | 3:c6a589f444b9 | 10 | myled = 0; // turn the LED on |
hudakz | 0:ab218237069e | 11 | wait(0.2); // 200 ms |
hudakz | 3:c6a589f444b9 | 12 | myled = 1; // turn the LED off |
hudakz | 0:ab218237069e | 13 | wait(1.0); // 1 sec |
hudakz | 0:ab218237069e | 14 | } |
hudakz | 0:ab218237069e | 15 | } |