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:e01b40aff738
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Mar 10 07:33:29 2014 +0000
@@ -0,0 +1,29 @@
+#include "mbed.h"
+
+BusOut ledice(dp28,dp6,dp5,dp27,dp26,dp25,dp24,dp23);
+DigitalOut enable(dp14);
+DigitalIn taster(dp1);
+int main() {
+    enable=0;
+    int i=0;
+    while(1) {
+        if(!taster)
+        {
+            ledice=i;
+            wait(1);
+            if(i>=255)
+            i=0;
+            else
+            i++;
+        }
+        else if(taster)
+        {
+            ledice=i;
+            wait(1);
+            if(i<=0)
+            i=255;
+            else
+            i--;
+        }
+    }
+}