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.
Diff: main.cpp
- Revision:
- 0:011dac18d106
diff -r 000000000000 -r 011dac18d106 main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Mon Nov 16 17:24:55 2009 +0000
@@ -0,0 +1,20 @@
+// Example using Serial rx interrupt, sford
+
+#include "mbed.h"
+
+DigitalOut myled(LED1);
+DigitalOut myled2(LED2);
+Serial pc(USBTX, USBRX);
+
+void foo() {
+ myled = !myled;
+ pc.putc(pc.getc() + 1);
+}
+
+int main() {
+ pc.attach(&foo);
+ while(1) {
+ myled2 = !myled2;
+ wait(0.25);
+ }
+}