7 Segment-Hex
Dependencies: mbed
Diff: main.cpp
- Revision:
- 0:265b94812ef8
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue May 02 08:14:36 2017 +0000 @@ -0,0 +1,47 @@ +#include "mbed.h" + +BusOut Segment(p29,p22,p23,p24,p25,p26,p21); + // a b c d e f g +int main() { + Segment = 0x1; //0 + wait(1); + Segment = 0x79; //1 + wait(1); + Segment = 0x24; //2 + wait(1); + Segment = 0x30; //3 + wait(1); + Segment = 0x58; //4 + wait(1); + Segment = 0x12; //5 + wait(1); + Segment = 0x2; //6 + wait(1); + Segment = 0x39; //7 + wait(1); + Segment = 0x0; //8 + wait(1); + Segment = 0x10; //9 + wait(1); + + + + } + + +/* +0000001 //0 1 +1111001 //1 79 +0100100 //2 24 +0110000 //3 30 +1011000 //4 58 +0010010 //5 12 +0000010 //6 2 +0111001 //7 39 +0000000 //8 0 +0010000 //9 10 + + + + +*/ \ No newline at end of file