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:1caccdf9730e, committed 2010-02-27
- Comitter:
- benbitwonder
- Date:
- Sat Feb 27 18:47:50 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 1caccdf9730e main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Sat Feb 27 18:47:50 2010 +0000
@@ -0,0 +1,28 @@
+#include "mbed.h"
+
+BusOut ledarray(LED1, LED2, LED3, LED4);
+
+int main(void) {
+ //A flag to indicate which direction we should rotate
+ bool flag = 0;
+ //the states of the outputs
+ char outstates = 1;
+
+ //Place the outputs in a known state
+ ledarray=1;
+
+ //Infinite loop
+ while(1) {
+ wait(0.25);
+ if (!flag) {
+ outstates *= 2;
+ if ((outstates>>3)&&1) flag=1;
+ } else {
+ outstates /=2;
+ if (outstates==1) flag=0;
+ }
+ ledarray=outstates;
+ }
+}
+
+
\ No newline at end of file
diff -r 000000000000 -r 1caccdf9730e mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sat Feb 27 18:47:50 2010 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/49a220cc26e0