7-segment display
Seven-segment display is a simulation of classic electronic display device, the concept of seven-segment display(SSD) is very easy to understand, each segment is assigned a unique number A-G, when that segment is lighted up using “1” to represent. e.g., “1111110” means 0 is displaying.
Seven-segmanet display
Digit | A | B | C | D | E | F | G |
---|---|---|---|---|---|---|---|
0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 |
1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 |
2 | 1 | 1 | 0 | 1 | 1 | 0 | 0 |
3 | 1 | 1 | 1 | 1 | 0 | 0 | 0 |
4 | 0 | 1 | 1 | 0 | 0 | 1 | 0 |
5 | 1 | 0 | 1 | 1 | 0 | 1 | 1 |
6 | 1 | 0 | 1 | 1 | 1 | 1 | 1 |
7 | 1 | 1 | 1 | 0 | 0 | 0 | 0 |
8 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
9 | 1 | 1 | 1 | 1 | 0 | 1 | 1 |
Here is how to use this seven-segment display.
1 | var ssd = new SevenSegDisplay("display", { |
Check it out on Github