*** ****

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
knut_johan
Date:
Fri Oct 09 15:12:00 2015 +0000
Commit message:
l?reboka

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 92e813cd7f42 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Oct 09 15:12:00 2015 +0000
@@ -0,0 +1,17 @@
+#include "mbed.h"
+
+BusOut display(D11,D10,D9,D5,D4,D3,D2,D1);
+
+int main()
+{   while(1)        {                               // while loop
+        for(int i=0;i<4;i++)    {                   // for loop
+            switch(i)               {               // switch
+                case 0: display = 0x3F; break;      // viser '0'    (0)011 1111 -> 3F
+                case 1: display = 0x06; break;      // viser '1'    (0)000 0110 -> 06
+                case 2: display = 0x5B; break;      // viser '2'    (0)101 1011 -> 5B
+                case 3: display = 0x4F; break;      // viser '3'    (0)100 1111 -> 4F
+                                    }               // end switch
+            wait(0.5);
+                                }                   // end for loop
+                    }                               // end while loop
+}                                                   // end main
\ No newline at end of file
diff -r 000000000000 -r 92e813cd7f42 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Oct 09 15:12:00 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/34e6b704fe68
\ No newline at end of file