![](/media/cache/profiles/1be11c5070263813a6c631ecdba885ef.jpg.50x50_q85.png)
Cambio de pin de entrada digital a PA10
Dependencies: BufferedSerial PinDetect mbed
Fork of DTK-MEGAPACA_NUCLEO by
Diff: main.cpp
- Revision:
- 3:98990a014463
- Parent:
- 2:01df16953268
- Child:
- 4:8a4c7f35157c
--- a/main.cpp Sat Aug 13 12:04:01 2016 +0000 +++ b/main.cpp Sun Oct 09 09:29:10 2016 +0000 @@ -1,15 +1,18 @@ #include "MapleMini.h" #include "mbed.h" - -Serial pc(PA_2, PA_3); -DigitalOut myled(LED1); - + int main() { + confSysClock(); //Configure system clock (72MHz HSE clock, 48MHz USB clock) + + Serial pc(PA_2, PA_3); + DigitalOut led(LED1); + while(1) { - myled = 1; // turn the LED on - wait(0.2); // 200 ms - myled = 0; // turn the LED off - wait(1.0); // 1 sec + led = 1; // turn the on-board LED on + wait_ms(200); // wait 200 millisecond + led = 0; // turn the on-board LED off + wait_ms(1000); // wait 1000 millisecond pc.printf("Blink\r\n"); } } + \ No newline at end of file