-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New display driver for I2C HT16K33 based 7 segment LED #8116
Conversation
This reverts commit f1ed412. Revert to remove unwanted commit, bringing back to match upstream HEAD
Add support for Seven Segment display using HT16K33 (#8116)
what about characters that can be shown on 7seg displays? If I wanted to display temperature as 24.2C or 155F? |
Since 24C (or 242C for 24.2C because the LED display doesn't have a segment for decimal point) and 155F are valid hex, the display can show it by giving it the decimal value and using 'x' to display as hex:
My 7 particular segment display has an dot segment that's in the place of the degree symbol (between the right-most two digits). So you can get the degree symbol as well by adding '.' like so:
Here are the modifiers you can add anywhere before the number.
DisplayMode:
For example, to display all segments:
|
Thanks for a detailed response. However, back to my temperature display question: |
it's worth mentioning that the most often uses sensors in tasmota are indeed the temperature/humidity sensors, so I'm pretty sure this would be a welcome addition by many |
Temperature/humidity display on a seven segment LED seems like it would be very useful. |
Which DisplayModel do I need to use for a 0.56" Led Backpack? When I use 3 I2C returns a 8X8Matrix starting address 0X73 to 0X76. The address of my backpack is 0X73 which I also define in DisplayAddress which returns DisplayAddress1 = 115. Flashed 8.3.1 on a Wemos D1 mini, configured Tasmota as a generic 18 model and set D1 as SCL and D2 as SDA. Output from Display: Tested it also with an example sketch from Adafruit and that worked out of the box. |
As per code and file
You'll also need to compile with the following defines (usually in your
|
Thanks, working fine now! Any chance in the near future for multiple display support as it is I2C, adding 1 or 2 more is easy from a wiring perspective, don't know about code though. |
Multiple of same type DisplayModel of display is doable, kinda like Matrix displays in a grid which is already in the code. Multiple displays of different types is tough because of different DisplayModels driver loading functionality, which I would think is a major code change. |
I have the Adafruit 7 segment .56" i2c backpack with the four dots "." in between each digit but I can't display a number with a decimal it just truncates the number to only the two digits to the left of the decimal point. Do you know what I am missing? DisplayText 84.7 shows 84 in the last two digit positions |
Yes, I'm talking about the same DisplayModel. I want to use multiple DS18B20 temperature sensors for checking my pool heater water and sending the values to HomeAssistant, but also displaying them near the pool. Using one device is much more convenient than one device per sensor. |
Ah, I see. I don't have this 7 segment model, so no code was written for these decimal points between the digits, and no tests were done on this model. I'll see if I can acquire one of these units and implement controlling these segments in the driver. |
That sounds like a great use case: separately addressable, 7 segment displays. This is definitely doable with some code changes. I'll look into it. |
Added multiple seven segment display functionality. Please see Pull Request #8886 |
Added support for Adafruit 0.56" 7-Segment LED display, with floating point and raw segment addressing. Please see Pull Request #8900 |
Description:
New display driver for I2C HT16K33 based 7 segment LED.
There exists a closed issue #3555 for this functionality, closed not implemented because the requester found a different hardware product which was supported. I needed large 4 digits 7 segment LED display, driven by HT16K33 backpack which the Tasmota code already supported with #define USE_DISPLAY_MATRIX. For the cleanest implementation, I used the xdsp_03 as a template and added xdsp_11 driver. Supports only one 7 segment display (unlike matrix xdsp_03 which supports multiple matrices). Scrolling is not supported.
Added driver files:
xdsp_11_sevenseg.ino (the next available unused xdsp number)
activated by:
#define USE_DISPLAY_SEVENSEG
Since the 7 segment display can only display numbers, I used some text prefix control codes to activate other segments:
: -> colon
x -> print hex
^ -> top left dot
v -> bottom left dot
. -> ampm dot
T -> 12 hour format
t -> 24 hour fomat
s -> given number is seconds
Examples:
787 -> 787
x47 -> 2F
st:241 -> 04:01
sT241 -> 4 01
Related issue (if applicable): fixes #
Checklist: