*** ****
Dependencies: mbed
Revision 0:92e813cd7f42, committed 2015-10-09
- 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 |
--- /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
--- /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