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:e63ba9ce4d7d, committed 2013-06-06
- Comitter:
- ogata_lab
- Date:
- Thu Jun 06 06:41:26 2013 +0000
- Commit message:
- first commit;
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 e63ba9ce4d7d main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Jun 06 06:41:26 2013 +0000 @@ -0,0 +1,22 @@ +#include "mbed.h" +#include "Serial.h" + +Serial usbSerial(USBTX, USBRX); +DigitalOut leds[4] = {LED1, LED2, LED3, LED4}; + +int main() { + int n = 0; + while(1) { + int i; + usbSerial.printf("Input Command:"); + usbSerial.scanf("%d", &n); + for(i = 0;i < 4 && i < n;i++) { + leds[i] = 1; + } + for(;i < 4;i++) { + leds[i] = 0; + } + usbSerial.printf("OK.¥m"); + wait(0.5); + } +}
diff -r 000000000000 -r e63ba9ce4d7d mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Jun 06 06:41:26 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/b3110cd2dd17 \ No newline at end of file