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.
Dependencies: mbed
Diff: main.cpp
- Revision:
- 1:ce08f1d8140c
- Parent:
- 0:0ee4748f4c5c
- Child:
- 2:eeab69a684ad
--- a/main.cpp Fri Jul 07 06:52:15 2017 +0000
+++ b/main.cpp Sat Jul 08 05:01:19 2017 +0000
@@ -1,12 +1,24 @@
#include "mbed.h"
-//------------------------------------------------------------------------------
-// Before using this example, ensure that you an hyperterminal installed on your
-// computer. More info here: https://developer.mbed.org/handbook/Terminals
-//
-// Hyperterminal default configuration:
-// 9600 bauds, 8-bit data, no parity
-//------------------------------------------------------------------------------
+/*------------------------------------------------------------------------------
+Before to use this example, ensure that you an hyperterminal installed on your
+computer. More info here: https://developer.mbed.org/handbook/Terminals
+
+The default serial comm port uses the SERIAL_TX and SERIAL_RX pins (see their
+definition in the PinNames.h file).
+
+The default serial configuration in this case is 9600 bauds, 8-bit data, no parity
+
+If you want to change the baudrate for example, you have to redeclare the
+serial object in your code:
+
+Serial pc(SERIAL_TX, SERIAL_RX);
+
+Then, you can modify the baudrate and print like this:
+
+pc.baud(115200);
+pc.printf("Hello World !\n");
+------------------------------------------------------------------------------*/
DigitalOut led(LED1);