7 Segment Binaer
Dependencies: mbed
Revision 0:ea23c44d59f0, committed 2017-05-02
- Comitter:
- Matthias_Praja
- Date:
- Tue May 02 08:32:37 2017 +0000
- Commit message:
- 7 Segment Binaer
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 Tue May 02 08:32:37 2017 +0000 @@ -0,0 +1,31 @@ +#include "mbed.h" + +BusOut Segment(p29,p22,p23,p24,p25,p26,p21); + // a b c d e f g +int main() { + while(1) + { + Segment = 0b0000001; //0 + wait(1); + Segment = 0b1111001; //1 + wait(1); + Segment = 0b0100100; //2 + wait(1); + Segment = 0b0110000; //3 + wait(1); + Segment = 0b1011000; //4 + wait(1); + Segment = 0b0010010; //5 + wait(1); + Segment = 0b0000010; //6 + wait(1); + Segment = 0b0111001; //7 + wait(1); + Segment = 0b0000000; //8 + wait(1); + Segment = 0b0010000; //9 + wait(1); + + + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue May 02 08:32:37 2017 +0000 @@ -0,0 +1,1 @@ +https://mbed.org/users/mbed_official/code/mbed/builds/794e51388b66 \ No newline at end of file