2021-12-12 00:31:21 +01:00
|
|
|
# Seven Segment Display Reloaded
|
|
|
|
|
2022-12-10 16:12:55 +01:00
|
|
|
Uses the overlay feature to create a configurable seven segment display.
|
2021-12-12 00:31:21 +01:00
|
|
|
Optimized for maximum configurability and use with seven segment clocks by parallyze (https://www.instructables.com/member/parallyze/instructables/)
|
|
|
|
Very loosely based on the existing usermod "seven segment display".
|
|
|
|
|
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
|
|
|
Add the compile-time option `-D USERMOD_SSDR` to your `platformio.ini` (or `platformio_override.ini`) or use `#define USERMOD_SSDR` in `my_config.h`.
|
|
|
|
|
|
|
|
For the auto brightness option, the usermod SN_Photoresistor has to be installed as well. See SN_Photoresistor/readme.md for instructions.
|
|
|
|
|
|
|
|
## Settings
|
2022-12-10 16:12:55 +01:00
|
|
|
All settings can be controlled via the usermod settings page.
|
2021-12-12 00:31:21 +01:00
|
|
|
Part of the settings can be controlled through MQTT with a raw payload or through a json request to /json/state.
|
|
|
|
|
|
|
|
### enabled
|
2022-12-10 16:12:55 +01:00
|
|
|
Enables/disables this usermod
|
2021-12-12 00:31:21 +01:00
|
|
|
|
|
|
|
### inverted
|
2022-12-10 16:12:55 +01:00
|
|
|
Enables the inverted mode in which the background should be enabled and the digits should be black (LEDs off)
|
2021-12-12 00:31:21 +01:00
|
|
|
|
|
|
|
### Colon-blinking
|
|
|
|
Enables the blinking colon(s) if they are defined
|
|
|
|
|
|
|
|
### enable-auto-brightness
|
2022-12-10 16:12:55 +01:00
|
|
|
Enables the auto brightness feature. Can be used only when the usermod SN_Photoresistor is installed.
|
2021-12-12 00:31:21 +01:00
|
|
|
|
|
|
|
### auto-brightness-min / auto-brightness-max
|
|
|
|
The lux value calculated from usermod SN_Photoresistor will be mapped to the values defined here.
|
2022-12-10 16:12:55 +01:00
|
|
|
The mapping, 0 - 1000 lux, will be mapped to auto-brightness-min and auto-brightness-max
|
2021-12-12 00:31:21 +01:00
|
|
|
|
2022-12-10 16:12:55 +01:00
|
|
|
WLED current protection will override the calculated value if it is too high.
|
2021-12-12 00:31:21 +01:00
|
|
|
|
|
|
|
### Display-Mask
|
|
|
|
Defines the type of the time/date display.
|
|
|
|
For example "H:m" (default)
|
|
|
|
- H - 00-23 hours
|
|
|
|
- h - 01-12 hours
|
|
|
|
- k - 01-24 hours
|
|
|
|
- m - 00-59 minutes
|
|
|
|
- s - 00-59 seconds
|
|
|
|
- d - 01-31 day of month
|
|
|
|
- M - 01-12 month
|
|
|
|
- y - 21 last two positions of year
|
|
|
|
- Y - 2021 year
|
|
|
|
- : for a colon
|
|
|
|
|
|
|
|
### LED-Numbers
|
|
|
|
- LED-Numbers-Hours
|
|
|
|
- LED-Numbers-Minutes
|
|
|
|
- LED-Numbers-Seconds
|
|
|
|
- LED-Numbers-Colons
|
|
|
|
- LED-Numbers-Day
|
|
|
|
- LED-Numbers-Month
|
|
|
|
- LED-Numbers-Year
|
|
|
|
|
|
|
|
See following example for usage.
|
|
|
|
|
|
|
|
|
|
|
|
## Example
|
|
|
|
|
2022-12-10 16:12:55 +01:00
|
|
|
Example of an LED definition:
|
2021-12-12 00:31:21 +01:00
|
|
|
```
|
|
|
|
< A >
|
|
|
|
/\ /\
|
|
|
|
F B
|
|
|
|
\/ \/
|
|
|
|
< G >
|
|
|
|
/\ /\
|
|
|
|
E C
|
|
|
|
\/ \/
|
|
|
|
< D >
|
|
|
|
```
|
|
|
|
|
2022-12-10 16:12:55 +01:00
|
|
|
LEDs or Range of LEDs are separated by a comma ","
|
2021-12-12 00:31:21 +01:00
|
|
|
|
2022-12-10 16:12:55 +01:00
|
|
|
Segments are separated by a semicolon ";" and are read as A;B;C;D;E;F;G
|
2021-12-12 00:31:21 +01:00
|
|
|
|
2022-12-10 16:12:55 +01:00
|
|
|
Digits are separated by colon ":" -> A;B;C;D;E;F;G:A;B;C;D;E;F;G
|
2021-12-12 00:31:21 +01:00
|
|
|
|
|
|
|
Ranges are defined as lower to higher (lower first)
|
|
|
|
|
2022-12-10 16:12:55 +01:00
|
|
|
For example, a clock definition for the following clock (https://www.instructables.com/Lazy-7-Quick-Build-Edition/) is
|
2021-12-12 00:31:21 +01:00
|
|
|
|
|
|
|
- hour "59,46;47-48;50-51;52-53;54-55;57-58;49,56:0,13;1-2;4-5;6-7;8-9;11-12;3,10"
|
|
|
|
|
|
|
|
- minute "37-38;39-40;42-43;44,31;32-33;35-36;34,41:21-22;23-24;26-27;28,15;16-17;19-20;18,25"
|
|
|
|
|
|
|
|
or
|
|
|
|
|
|
|
|
- hour "6,7;8,9;11,12;13,0;1,2;4,5;3,10:52,53;54,55;57,58;59,46;47,48;50,51;49,56"
|
|
|
|
|
|
|
|
- minute "15,28;16,17;19,20;21,22;23,24;26,27;18,25:31,44;32,33;35,36;37,38;39,40;42,43;34,41"
|
|
|
|
|
|
|
|
depending on the orientation.
|
|
|
|
|
2022-12-10 16:12:55 +01:00
|
|
|
# Example details:
|
2021-12-12 00:31:21 +01:00
|
|
|
hour "59,46;47-48;50-51;52-53;54-55;57-58;49,56:0,13;1-2;4-5;6-7;8-9;11-12;3,10"
|
|
|
|
|
2022-12-10 16:12:55 +01:00
|
|
|
there are two digits separated by ":"
|
2021-12-12 00:31:21 +01:00
|
|
|
|
|
|
|
- 59,46;47-48;50-51;52-53;54-55;57-58;49,56
|
|
|
|
- 0,13;1-2;4-5;6-7;8-9;11-12;3,10
|
|
|
|
|
|
|
|
In the first digit,
|
2022-12-10 16:12:55 +01:00
|
|
|
the **segment A** consists of the LEDs number **59 and 46**., **segment B** consists of the LEDs number **47, 48** and so on
|
2021-12-12 00:31:21 +01:00
|
|
|
|
2022-12-10 16:12:55 +01:00
|
|
|
The second digit starts again with **segment A** and LEDs **0 and 13**, **segment B** consists of the LEDs number **1 and 2** and so on
|
2021-12-12 00:31:21 +01:00
|
|
|
|
|
|
|
### first digit of the hour
|
|
|
|
- Segment A: 59, 46
|
|
|
|
- Segment B: 47, 48
|
|
|
|
- Segment C: 50, 51
|
|
|
|
- Segment D: 52, 53
|
|
|
|
- Segment E: 54, 55
|
|
|
|
- Segment F: 57, 58
|
|
|
|
- Segment G: 49, 56
|
|
|
|
|
|
|
|
### second digit of the hour
|
|
|
|
|
|
|
|
- Segment A: 0, 13
|
|
|
|
- Segment B: 1, 2
|
|
|
|
- Segment C: 4, 5
|
|
|
|
- Segment D: 6, 7
|
|
|
|
- Segment E: 8, 9
|
|
|
|
- Segment F: 11, 12
|
2022-12-10 16:12:55 +01:00
|
|
|
- Segment G: 3, 10
|