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:6bc335cfca7c, committed 2010-01-13
- Comitter:
- ace1
- Date:
- Wed Jan 13 04:36:26 2010 +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 6bc335cfca7c main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Wed Jan 13 04:36:26 2010 +0000
@@ -0,0 +1,63 @@
+#include "mbed.h"
+
+int test; //variable used in for loop to increment and decrement
+
+DigitalOut led1(LED1);
+DigitalOut led2(LED2);
+DigitalOut led3(LED3);
+DigitalOut led4(LED4);
+
+int main() {
+ while (test < 5) {
+
+ if (test == 0) {
+ led1 = 1;
+ wait(0.1);
+ led1 = 0;
+ wait(0.1);
+ };
+
+ if (test ==1) {
+ led2 = 1;
+ wait(0.1);
+ led2 = 0;
+ wait(0.1);
+ };
+
+ if (test ==2) {
+ led3 = 1;
+ wait(0.1);
+ led3 = 0;
+ wait(0.1);
+ };
+
+ if (test ==3) {
+ led4 = 1;
+ wait(0.1);
+ led4 = 0;
+ wait(0.1);
+ }
+
+ test++;
+
+ if (test == 4) {
+ test--;
+ led3 = 1;
+ wait(0.1);
+ led3 = 0;
+ wait(0.1);
+
+ test--;
+ led2 = 1;
+ wait(0.1);
+ led2 = 0;
+ wait(0.1);
+
+ test--;
+ led1 = 1;
+ wait(0.1);
+ led1 = 0;
+ wait(0.1);
+ }
+ }
+}
diff -r 000000000000 -r 6bc335cfca7c mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Jan 13 04:36:26 2010 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/49a220cc26e0