![](/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
main.cpp@0:d81be2ce0c05, 2016-07-17 (annotated)
- Committer:
- hudakz
- Date:
- Sun Jul 17 08:46:45 2016 +0000
- Revision:
- 0:d81be2ce0c05
- Child:
- 1:f05b1d8380cb
Initial issue
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
hudakz | 0:d81be2ce0c05 | 1 | #include "MapleMini.h" |
hudakz | 0:d81be2ce0c05 | 2 | #include "mbed.h" |
hudakz | 0:d81be2ce0c05 | 3 | |
hudakz | 0:d81be2ce0c05 | 4 | Serial pc(PA_2, PA_3); |
hudakz | 0:d81be2ce0c05 | 5 | DigitalOut myled(LED1); |
hudakz | 0:d81be2ce0c05 | 6 | |
hudakz | 0:d81be2ce0c05 | 7 | int main() { |
hudakz | 0:d81be2ce0c05 | 8 | confSysClock(); // Configure system clock (72MHz HSE clock, 36MHz APB1 peripheral clock) |
hudakz | 0:d81be2ce0c05 | 9 | while(1) { |
hudakz | 0:d81be2ce0c05 | 10 | myled = 1; // turn the LED on |
hudakz | 0:d81be2ce0c05 | 11 | wait(0.2); // 200 ms |
hudakz | 0:d81be2ce0c05 | 12 | myled = 0; // turn the LED off |
hudakz | 0:d81be2ce0c05 | 13 | wait(1.0); // 1 sec |
hudakz | 0:d81be2ce0c05 | 14 | pc.printf("Blink\r\n"); |
hudakz | 0:d81be2ce0c05 | 15 | } |
hudakz | 0:d81be2ce0c05 | 16 | } |