-
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
Added support for TM1638 Seven-Segment Display #11031
Conversation
Presently, the code is written such that proper initialization and working of the TM1637/8 driver depends on the existence of However, SPI is not really required for this driver to work, as the TM1637/8 driver now uses dedicated Pins TM1637 CLK and TM1637 DIO Unnecessarily enabling SPI is causing the SPI pins to be assigned to 3 other GPIOs in Tasmota Configuration page, and it cannot be unset. To this end, I have made the changes in 75699fe so that the dependency of TM1637/8 on SPI is removed. |
Hi, Thanks for adding the support for TM1638 as a display - I wonder what options you consider there are for adding back the support for the button and the LEDs? It seems like a pretty useful little board for doing control with. It's sort of mostly a redundant piece of hardware if it's connected to something running Tasmota without the buttons and LEDs. I'd love to offer my help, but I can't code to save my life... hence using Tasmota! Happy to provide additional testing / boards / etc etc though. I saw that some time back there was some support for the buttons (I think) https://github.com/arendst/Tasmota/issues/3487 - is there a way to implement it going forward? |
Hi! I am also wondering how the buttons and leds could be included. Are there any concerns around this feature. |
I think it was an issue of separation of concerns in the driver
implementation. A driver could either be an output driver (display, in this
case), or an input driver (one that reads from buttons or sensors). Not
both together.
…On Sat, 4 Feb 2023, 13:49 mkohns, ***@***.***> wrote:
Hi! I am also wondering how the buttons and leds could be included. Are
there any concerns around this feature.
—
Reply to this email directly, view it on GitHub
<#11031 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACBUVQLCPYCTLPPFDCHNBUTWVYGHZANCNFSM4X2XAP4A>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
While it is best to have indépendant drivers for indépendant component that can be re-usedin a different context, it happens that sometime a driver has to be done for a specific board and not for si gle components when they are tight together How are the buttons connected? |
The buttons are part of the TM1638 https://www.segor.de/dokumente/tm1638.pdf quote: TM1638 is LED driver controller with key-scan interface, MCU digital interface, data latch, LED I am using the library TM1638plus in my projects. From my point of view this is an edge case. |
Another question: I am not yet familiar with the new esp32 berry script. Just reading the docs - I have the feeling that reading the buttons could be possible with berry. What is your feeling about this? |
The good thing is that Tasmota driver is also based on TM1638plus |
There is already support for the buttons as Switches in the driver |
@mkohns |
Breaking change TM1638 button and led support are handled as virtual switches and relays (#11031)
Try latest dev release. It introduces the keys as switches and the leds as relays. All switchmodes do apply. Optionally compile options can change switch support to button support allowing use of button features. #define USE_TM1638 // Add support for TM1638 switches copying Switch1 .. Switch8 (+1k code) |
HI @arendst, i compiled the current dev branch and tested the TM1638. I am using a board tasmota32s2.
But your code seems to be in -DFIRMWARE_TASMOTA32 Can you give me a hint? |
That's a hack, not officially supported 🙄 The proper way is to compile tasmota32s2 with all the needed defines in user_config_override.h
|
Just received today my 2 TM1638 Works like a charm ! |
A little ruleset to enter a 8 digit code (with only digits 1 to 8)
Will do a little update to the docs |
Hallo, can you please add also support for the tm1638 4x4 16 button board?? |
I have one in the AliEx mail but expected in may :( |
@FraatTailscale I haven't received my unit yet but looking at the code, I think everything is there
|
I have received my TM1638 4x4 buttons boards There must be some more differences between the 2 boards in trms of wiring/muxing Does anyone knows where I can find reference/sample code that works for both model of board so I can compare ? @Jason2866 Didn't you also ordered a 4x4 board ? Regards Jean-Michel |
Ok, I found the library and there will be some changes to do |
@barbudor did not order the 4x4 version. |
Hallo, are there any news regarding the TM1638 4x4 board? |
I apparently burned down my 1st 4*4 board. |
Hallo, are there any news regarding the TM1638 4x4 board? |
Description:
This is an update of the TM1637 driver, which adds support for the TM1638 seven-segment display
(+ onboard buttons +LEDs)module.The update for the TM1638 includes all the "Display" commands of the TM1637
, and additionally, has the ability to set the onboard LEDs and react to button presses.This PR also adds a newSettings.display_type
parameter, used here to switch between different display variants supported by the same (TM1637) driver. It now uses the newSettings.display_options
to switch between display variants.The DisplayType command now manipulates theSettings.display_options.data
value.Thus the TM1637 4-digit is DisplayType 0, TM1637 6-digit is DisplayType 1 and TM1638 is DisplayType 2. A future addition could be DisplayType 3 for the MAX7219.Related issue (if applicable):
#10889
Checklist:
NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass