Blink 0.2
Dependencies: mbed-STM32F030F4
Fork of STM32F031_blink_LED_2 by
main.cpp
- Committer:
- krepemar
- Date:
- 2015-04-26
- Revision:
- 1:6d1a367bdba2
- Parent:
- 0:ccaa0ada3fe9
- Child:
- 2:ea82db1b8367
File content as of revision 1:6d1a367bdba2:
/********************************************************************************** * @file main.cpp * @author Marta Krepelkova * @version V0.1 * @date 26-April-2015 * @brief LED blinking with microcontroller in a small package ***********************************************************************************/ /**********************************************************************************/ /* Table of used pins on STM32F0 Discovery kit with STM32F031F6P6 MCU (TSSOP20) */ /**********************************************************************************/ /* TSSOP20 pin | peripheral */ /* 11 (PA_5) | LED */ /**********************************************************************************/ /* Includes ----------------------------------------------------------------------*/ #include "mbed.h" /* Defines -----------------------------------------------------------------------*/ /* Function prototypes -----------------------------------------------------------*/ /* Variables ---------------------------------------------------------------------*/ // mbed - initialization of peripherals DigitalOut myled(PA_5); // LED is connected to PA_5 /* Functions----------------------------------------------------------------------*/ /*********************************************************************************** * Function Name : main. * Description : Main routine. * Input : None. * Output : None. * Return : None. ***********************************************************************************/ int main() { while(1) { myled = 1; // LED is OFF (we have connected it to VCC) wait(0.2); // 200 ms myled = 0; // LED is On wait(1.0); // 1 sec } }