|
| 1 | +# Seven Segment Display |
| 2 | + |
| 3 | +Usermod that uses the overlay feature to create a configurable seven segment display. |
| 4 | +This has only been tested on a single configuration. Colon support is entirely untested. |
| 5 | + |
| 6 | +## Installation |
| 7 | + |
| 8 | +Add the compile-time option `-D USERMOD_SEVEN_SEGMENT` to your `platformio.ini` (or `platformio_override.ini`) or use `#define USERMOD_SEVEN_SEGMENT` in `my_config.h`. |
| 9 | + |
| 10 | +## Settings |
| 11 | +Settings can be controlled through both the usermod setting page and through MQTT with a raw payload. |
| 12 | +##### Example |
| 13 | + Topic ```<mqttDeviceTopic||mqttGroupTopic>/sevenSeg/perSegment/set``` |
| 14 | + Payload ```3``` |
| 15 | +#### perSegment -- ssLEDPerSegment |
| 16 | +The number of individual LEDs per segment. There are 7 segments per digit. |
| 17 | +#### perPeriod -- ssLEDPerPeriod |
| 18 | +The number of individual LEDs per period. A ':' has 2x periods. |
| 19 | +#### startIdx -- ssStartLED |
| 20 | +Index of the LED that the display starts at. Allows a seven segment display to be in the middle of a string. |
| 21 | +#### timeEnable -- ssTimeEnabled |
| 22 | +When true, when displayMask is configured for a time output and no message is set the time will be displayed. |
| 23 | +#### scrollSpd -- ssScrollSpeed |
| 24 | +Time, in milliseconds, between message shifts when the length of displayMsg exceeds the length of the displayMask. |
| 25 | +#### displayMask -- ssDisplayMask |
| 26 | +This should represent the configuration of the physical display. |
| 27 | +<pre> |
| 28 | +HH - 0-23. hh - 1-12, kk - 1-24 hours |
| 29 | +MM or mm - 0-59 minutes |
| 30 | +SS or ss = 0-59 seconds |
| 31 | +: for a colon |
| 32 | +All others for alpha numeric, (will be blank when displaying time) |
| 33 | +</pre> |
| 34 | +##### Example |
| 35 | +```HHMMSS ``` |
| 36 | +```hh:MM:SS ``` |
| 37 | +#### displayMsg -- ssDisplayMessage |
| 38 | +Message to be displayed across the display. If the length exceeds the length of the displayMask the message will scroll at scrollSpd. To 'remove' a message or revert back to time, if timeEnabled is true, set the message to '~'. |
| 39 | +#### displayCfg -- ssDisplayConfig |
| 40 | +The order that your LEDs are configured. All seven segments in the display need to be wired the same way. |
| 41 | +<pre> |
| 42 | + ------- |
| 43 | + / A / 0 - EDCGFAB |
| 44 | + / F / B 1 - EDCBAFG |
| 45 | + / / 2 - GCDEFAB |
| 46 | + ------- 3 - GBAFEDC |
| 47 | + / G / 4 - FABGEDC |
| 48 | + / E / C 5 - FABCDEG |
| 49 | + / / |
| 50 | + ------- |
| 51 | + D |
| 52 | +</pre> |
| 53 | + |
| 54 | +## Version |
| 55 | +20211009 - Initial release |
0 commit comments