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.
main.cpp@1:958d1da2df76, 2014-11-24 (annotated)
- Committer:
- joshchen
- Date:
- Mon Nov 24 07:07:58 2014 +0000
- Revision:
- 1:958d1da2df76
- Parent:
- 0:da0f60df536b
- Child:
- 2:21b2552c3724
change baurate from 115200 to 921600, it's ok
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| joshchen | 0:da0f60df536b | 1 | #include "mbed.h" |
| joshchen | 0:da0f60df536b | 2 | |
| joshchen | 0:da0f60df536b | 3 | Serial pc(SERIAL_TX, SERIAL_RX); |
| joshchen | 0:da0f60df536b | 4 | DigitalOut myled(LED2); |
| joshchen | 0:da0f60df536b | 5 | |
| joshchen | 0:da0f60df536b | 6 | int main() { |
| joshchen | 1:958d1da2df76 | 7 | pc.baud(921600); |
| joshchen | 0:da0f60df536b | 8 | pc.printf("Hello World !\n"); |
| joshchen | 0:da0f60df536b | 9 | int i=0; |
| joshchen | 0:da0f60df536b | 10 | while(1) { |
| joshchen | 0:da0f60df536b | 11 | pc.printf("This program runs since %d seconds.\n", i++); |
| joshchen | 0:da0f60df536b | 12 | wait(1); |
| joshchen | 0:da0f60df536b | 13 | myled = !myled; |
| joshchen | 0:da0f60df536b | 14 | } |
| joshchen | 0:da0f60df536b | 15 | } |