7 Segment-Hex
Dependencies: mbed
main.cpp
- Committer:
- Matthias_Praja
- Date:
- 2017-05-02
- Revision:
- 0:265b94812ef8
File content as of revision 0:265b94812ef8:
#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 */