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:ffa3929949f3, committed 2011-05-21
- Comitter:
- jksoft
- Date:
- Sat May 21 07:30:27 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 |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Sat May 21 07:30:27 2011 +0000
@@ -0,0 +1,37 @@
+#include "mbed.h"
+
+DigitalOut led1(LED1);
+DigitalOut led2(LED2);
+DigitalOut led3(LED3);
+DigitalOut led4(LED4);
+Serial pc(USBTX, USBRX);
+
+int main() {
+ char ch;
+
+ while(1) {
+
+ pc.printf("Push 1-4 Key->");
+ ch = pc.getc();
+ pc.printf("%c¥r¥n",ch);
+
+ switch(ch)
+ {
+ case '1':
+ led1 =! led1;
+ break;
+ case '2':
+ led2 =! led2;
+ break;
+ case '3':
+ led3 =! led3;
+ break;
+ case '4':
+ led4 =! led4;
+ break;
+ default:
+ pc.printf("Please push the key to 1-4.¥r¥n");
+ break;
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sat May 21 07:30:27 2011 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/63bcd7ba4912