Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Nucleo-mbed-os-example-blinky by
Diff: main.cpp
- Revision:
- 1:860c7462805e
- Parent:
- 0:681c27ac21c0
- Child:
- 2:07a218c4cb20
--- a/main.cpp Wed Aug 17 17:58:13 2016 +0000
+++ b/main.cpp Wed Aug 17 18:01:51 2016 +0000
@@ -4,6 +4,7 @@
DigitalOut led1(LED1);
InterruptIn event(USER_BUTTON);
Ticker ticker;
+Serial ser(USBTX, USBRX);
void
ButtonPressed(void)
@@ -13,12 +14,16 @@
void
AlarmHandler(void)
-{
- led1 = !led1;
+{
+ static int alarmCount;
+ led1 = !led1;
}
int main()
{
+ ser.baud(230400);
+ ser.printf("Hello, World\r\n");
+
event.rise(&ButtonPressed);
ticker.attach(&AlarmHandler, 1.5);
