NUCLEO-F042K6 Simple demo blinking LED using waits
Dependencies: mbed
Diff: main.cpp
- Revision:
- 2:fd849f6babbb
- Parent:
- 0:3e4e987e751b
- Child:
- 3:deb248262461
--- a/main.cpp Wed Jan 31 19:52:44 2018 +0000 +++ b/main.cpp Wed Jan 31 19:57:42 2018 +0000 @@ -5,13 +5,13 @@ int main() { while(1) { - for(int i=0; i<10; i++) { + for(int i=0; i<2; i++) { LED = 1; // turn LED on - wait_ms(500); // wait 500 ms + wait_ms(200); // wait 200 ms LED = 0; // turnd LED off - wait_ms(500); // wait 500 ms + wait_ms(200); // wait 200 ms } - for(int i=0; i<10; i++) { + for(int i=0; i<2; i++) { LED = 1; // turn LED on wait_us(1000000); // wait 1000000 us LED = 0; // turnd LED off