7 Segment-Hex
Dependencies: mbed
main.cpp@0:265b94812ef8, 2017-05-02 (annotated)
- Committer:
- Matthias_Praja
- Date:
- Tue May 02 08:14:36 2017 +0000
- Revision:
- 0:265b94812ef8
7 Segment-Hex
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Matthias_Praja | 0:265b94812ef8 | 1 | #include "mbed.h" |
Matthias_Praja | 0:265b94812ef8 | 2 | |
Matthias_Praja | 0:265b94812ef8 | 3 | BusOut Segment(p29,p22,p23,p24,p25,p26,p21); |
Matthias_Praja | 0:265b94812ef8 | 4 | // a b c d e f g |
Matthias_Praja | 0:265b94812ef8 | 5 | int main() { |
Matthias_Praja | 0:265b94812ef8 | 6 | Segment = 0x1; //0 |
Matthias_Praja | 0:265b94812ef8 | 7 | wait(1); |
Matthias_Praja | 0:265b94812ef8 | 8 | Segment = 0x79; //1 |
Matthias_Praja | 0:265b94812ef8 | 9 | wait(1); |
Matthias_Praja | 0:265b94812ef8 | 10 | Segment = 0x24; //2 |
Matthias_Praja | 0:265b94812ef8 | 11 | wait(1); |
Matthias_Praja | 0:265b94812ef8 | 12 | Segment = 0x30; //3 |
Matthias_Praja | 0:265b94812ef8 | 13 | wait(1); |
Matthias_Praja | 0:265b94812ef8 | 14 | Segment = 0x58; //4 |
Matthias_Praja | 0:265b94812ef8 | 15 | wait(1); |
Matthias_Praja | 0:265b94812ef8 | 16 | Segment = 0x12; //5 |
Matthias_Praja | 0:265b94812ef8 | 17 | wait(1); |
Matthias_Praja | 0:265b94812ef8 | 18 | Segment = 0x2; //6 |
Matthias_Praja | 0:265b94812ef8 | 19 | wait(1); |
Matthias_Praja | 0:265b94812ef8 | 20 | Segment = 0x39; //7 |
Matthias_Praja | 0:265b94812ef8 | 21 | wait(1); |
Matthias_Praja | 0:265b94812ef8 | 22 | Segment = 0x0; //8 |
Matthias_Praja | 0:265b94812ef8 | 23 | wait(1); |
Matthias_Praja | 0:265b94812ef8 | 24 | Segment = 0x10; //9 |
Matthias_Praja | 0:265b94812ef8 | 25 | wait(1); |
Matthias_Praja | 0:265b94812ef8 | 26 | |
Matthias_Praja | 0:265b94812ef8 | 27 | |
Matthias_Praja | 0:265b94812ef8 | 28 | |
Matthias_Praja | 0:265b94812ef8 | 29 | } |
Matthias_Praja | 0:265b94812ef8 | 30 | |
Matthias_Praja | 0:265b94812ef8 | 31 | |
Matthias_Praja | 0:265b94812ef8 | 32 | /* |
Matthias_Praja | 0:265b94812ef8 | 33 | 0000001 //0 1 |
Matthias_Praja | 0:265b94812ef8 | 34 | 1111001 //1 79 |
Matthias_Praja | 0:265b94812ef8 | 35 | 0100100 //2 24 |
Matthias_Praja | 0:265b94812ef8 | 36 | 0110000 //3 30 |
Matthias_Praja | 0:265b94812ef8 | 37 | 1011000 //4 58 |
Matthias_Praja | 0:265b94812ef8 | 38 | 0010010 //5 12 |
Matthias_Praja | 0:265b94812ef8 | 39 | 0000010 //6 2 |
Matthias_Praja | 0:265b94812ef8 | 40 | 0111001 //7 39 |
Matthias_Praja | 0:265b94812ef8 | 41 | 0000000 //8 0 |
Matthias_Praja | 0:265b94812ef8 | 42 | 0010000 //9 10 |
Matthias_Praja | 0:265b94812ef8 | 43 | |
Matthias_Praja | 0:265b94812ef8 | 44 | |
Matthias_Praja | 0:265b94812ef8 | 45 | |
Matthias_Praja | 0:265b94812ef8 | 46 | |
Matthias_Praja | 0:265b94812ef8 | 47 | */ |