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.
Revision 0:3c9dd1f868aa, committed 2011-02-13
- Comitter:
- simon
- Date:
- Sun Feb 13 20:43:09 2011 +0000
- Commit message:
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
| mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r 3c9dd1f868aa main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Sun Feb 13 20:43:09 2011 +0000
@@ -0,0 +1,19 @@
+// example showing sending/receiving character
+
+#include "mbed.h"
+
+// connect p9 to p14 with a wire!
+Serial out(p9, NC);
+Serial in(NC, p14);
+
+DigitalOut led(LED1);
+
+int main() {
+ out.putc('h');
+ out.putc('i');
+ char c1 = in.getc();
+ char c2 = in.getc();
+
+ led = 1;
+ printf("c1: %c, c2: %c\n", c1, c2);
+}
diff -r 000000000000 -r 3c9dd1f868aa mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sun Feb 13 20:43:09 2011 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/63bcd7ba4912