Skip to content
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

PR2 max7219 dot matrix, less memory #14091

Merged
merged 14 commits into from
Dec 20, 2021
Merged

PR2 max7219 dot matrix, less memory #14091

merged 14 commits into from
Dec 20, 2021

Conversation

sternegugger
Copy link

Description:

This driver enables the display of ascii text on MAX7219 based 8x8 LED dot matrix modules (1088AS).
#define USE_DISPLAY_MAX7219_MATRIX
See also usage description in file tasmota/xdsp_19_max7219_matrix.ino

144709719-2fb4ff2c-7645-4dd8-b0a3-eccd306d63f0
144709723-833ff002-ef84-431a-b05f-8b7ef30e0072

Same functionality as PR #13917, but less memory usage.
(character table only for standard ascii, no usage of lib time.h)

tasmota_display witout USE_DISPLAY_MAX7219_MATRIX
uses 609556 bytes

tasmota_display #define USE_DISPLAY_MAX7219_MATRIX
uses 603736 bytes
(-5820 bytes, cause impicit #undef USE_DISPLAY_MAX7219 and #undef USE_DISPLAY_TM1637)

tasmota_display #define USE_DISPLAY_MAX7219_MATRIX #define USE_UTF8_LATIN1
uses 604584 bytes
(+848 bytes for additional character tables)

Checklist:

  • The pull request is done against the latest development branch
  • Only relevant files were touched
  • Only one feature/fix was added per PR and the code change compiles without warnings
  • The code change is tested and works with Tasmota core ESP8266 V.2.7.4.9
  • The code change is tested and works with Tasmota core ESP32 V.2.0.1.1
  • I accept the CLA.

NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass

@arendst arendst merged commit d4b9381 into arendst:development Dec 20, 2021
@Rushmed
Copy link

Rushmed commented Jan 8, 2022

Thanks a lot for making the matrix displays work with tasmota.
20220108_213059
I use eight 8x8 modules in a row. The first module is always on full brightnes and all LEDs are on.
In the picture the 1234567890 should be displayed and as you can see tne 1 is missing.

Any idea?

Edit: Solved by changing Module type from Generic (18) to Generic (0)

@sternegugger
Copy link
Author

Have you set "DisplayWidth 64"? (64 pixels in a row).
It might help to power off and on the 5V for the matrix display and restart the ESP.
The display must have power when the ESP starts to get initialized.
(The first display on your photo is not initialized).

Are you shure that the orientation of the first display isn't upside down?
Try to unplug it, turn it 180° and plug it in again.

@Rushmed
Copy link

Rushmed commented Jan 9, 2022

The display is powered by the ESP so how to bring power to the diplay before ESP starts.
Is ther a way to force initialisation?

@Rushmed
Copy link

Rushmed commented Jan 15, 2022

I compared your driver with this one. There is no initialisation issue, as my tests figured out.

Is there a way to provide modes in your driver?

@sternegugger
Copy link
Author

Hi Rushmed,

there is no initialisation issue with this driver when wowering the ESP and the display at the same time.

Edit: Solved by changing Module type from Generic (18) to Generic (0)

Yes, chaniging the module type causes a restart of the module which resends the initalisation to the display.

Is ther a way to force initialisation?

Yes: Restarting the ESP. E.g. use the web console command "restart"

Is there a way to provide modes in your driver?

The driver is written memory optimized and contains only a minimum of necessary functionality.
It only scrolls when the text is longer than the display width.
It can blink using the command "displayBlinkrate".
It can show the current time using the command displayClock.

Which display modes do you miss for your project?

Regards,
Michael

@Rushmed
Copy link

Rushmed commented Jan 17, 2022

Hallo Michael,

do you connect the LEDs to the power source directly? I am powering the LEDs with the ESP output.
The restart command does not help for me. The only way to get all modules initialized is to unplug and replug the ESP which sometimes leads to loss of configuration. Of course tahs just a test setup which I poweroff every evening. In real live the esp will stay powered on.
I ve just been asking for your plans of integrating any modes, I dont miss anything.

@sternegugger
Copy link
Author

Hi Rushmed,

do you connect the LEDs to the power source directly?

No, I use the same USB power supply as for the ESP.
Depending on the display size , the used current could be more than 1 A.
Please do not use a PC USB output to power the display. It supports only 500 mA maximum.
Using more current decreases the Voltage, which could have bad impact to the GPIO signal quality.

So be sure to use a 5 V source with enough power.

@Rushmed
Copy link

Rushmed commented Jan 18, 2022

OK thanks.

@Rushmed
Copy link

Rushmed commented Jan 21, 2022

FYI. I was able to solve the initialisation issue by the help of another user.
My mistke was to use GPIO15 (D8).
Now it works as expected.
Thanks!

@bigtruite
Copy link

bigtruite commented Jan 31, 2022

Thank you very much. :-) :-) I already use 16 moduls in row. Still using another code, which is still buggy. My standard view is a clock <weekday, month, day, hh:mm:ss>. I find it really cool. Every minute i generate a mqtt post from openhab with sensor values from my smart home. After that it returns to the clock. Is this clock already possible with tasmota? Could it be added too?

vlcsnap-2022-01-31-15h59m46s303

@sternegugger
Copy link
Author

My standard view is a clock <weekday, month, day, hh:mm:ss>. I find it really cool. Every minute i generate a mqtt post from openhab with sensor values from my smart home. After that it returns to the clock. Is this clock already possible with tasmota? Could it be added too?

Using this display with Tasmota it can display any string via MQTT.
E.g.: displayText Mon Jan 31 10:07
You could repeat it every minute to update the minute digits
This should be done via an MQTT client (I'm using openhab), which controlls the whole functionality.

The tasmota display driver also supports a clock display.
Please try command: displayClock
Depending of displayWidth it shows "HH:MM" or "HH:MM:SS".
The date is not displayed. There are too many variants depending on language and country.

To switch back from clock to text send: displayMode 0
Now you can use displayText again to display any other text.

Regards,
Michael

@bigtruite
Copy link

bigtruite commented Feb 2, 2022

My standard view is a clock <weekday, month, day, hh:mm:ss>. I find it really cool. Every minute i generate a mqtt post from openhab with sensor values from my smart home. After that it returns to the clock. Is this clock already possible with tasmota? Could it be added too?

Using this display with Tasmota it can display any string via MQTT. E.g.: displayText Mon Jan 31 10:07 You could repeat it every minute to update the minute digits This should be done via an MQTT client (I'm using openhab), which controlls the whole functionality.

The tasmota display driver also supports a clock display. Please try command: displayClock Depending of displayWidth it shows "HH:MM" or "HH:MM:SS". The date is not displayed. There are too many variants depending on language and country.

To switch back from clock to text send: displayMode 0 Now you can use displayText again to display any other text.

Regards, Michael

Dear Michael,

i also use openhab with this current code to post a mqtt payload. But i already send all my values from my weatherstation every minute. So it is not possible to post a second one with my time notification withous having trouble with synchronisation. And i would loos the seconds, that are displayed now. Just see the video i added. The max 7219 are really cool and it is really easy to use more than one or two of them. The current clock with "HH:MM" or "HH:MM:SS" could be too small if you use 4 elements ore more of max7219. Just try to put the english notification. It would be enough if this option could be set in the xdsp_19_max7219_matrix.ino itself. Could be very cool. :-)

Thank you very much.

Regards Patrick.

VID_20220131_100758.mp4

@Rushmed
Copy link

Rushmed commented Feb 20, 2022

Is this driver included in the new Tasmota V11 display.bin or do I still need to implement and compile?

@oliver-koch
Copy link

Changelog of v11 says yes:

Support for MAX7219 Dot Matrix displays #14091

@Rushmed
Copy link

Rushmed commented Feb 20, 2022

I know but its not working.

@sternegugger
Copy link
Author

Is this driver included in the new Tasmota V11 display.bin or do I still need to implement and compile?

Yes, as described you still need to compile with:
#define USE_DISPLAY_MAX7219_MATRIX

Resaon:
the default supports MAX7219 driver for 7 segment displays.
The behaviour of MAX7219_MATRIX supports 8x8 matrix displays, which is different to 7 segment displays.

#define USE_DISPLAY_MAX7219_MATRIX
disables the default support of MAX7219 based 7 segment displays und supports MAX7219 based 8x8 matrix displays instead.

See also file tasmota_template.h line 558 on v11.0.0

@Rushmed
Copy link

Rushmed commented Feb 20, 2022

ok, thanks!

@Rojer7084
Copy link

Rojer7084 commented Jun 12, 2022

Dear frend,
I use 4 modules the display not correct , the charecter was saparate . anyone found like me?
and I also set "DisplayWidth 32 " and "DisplayHeight 8"

@maxduckduck
Copy link

Hi,
The TM1637, TM1638 and MAX7219 Seven-Segment Display~ has the feature (DisplayLevel) that displays a single column bar. Is it possible to have similar functionality for multible columns in the 8x8 Matrix? I use this for water tank levels but I have multiple tanks and was trying to simplify things.

@IlmNaseerAhmed
Copy link

i am a beginner i only knows how to use tasmotizer with nodemcu, can any body give me a bin file, regards

@viktor6
Copy link

viktor6 commented Nov 21, 2023

share the firmware for esp32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants