esphome / feature-requests

ESPHome Feature Request Tracker
https://esphome.io/
413 stars 26 forks source link

Support ST7920 display #563

Closed Misiu closed 3 years ago

Misiu commented 4 years ago

Describe the problem you have/What new integration you would like

Consider adding support for the ST7920 display. It is a good alternative for SSD1325. Please describe your use case for this integration and alternatives you've tried:

The use case is fairly simple, I'd like to be able to use ST7920 with ESP Home Additional context

The recent version of ESP8266 library (2.5.1) supports hardware SPI (https://github.com/esp8266/Arduino/pull/5948), display code already exists, so it shouldn't be hard for someone with good knowledge of this awesome project.

Useful links: https://github.com/olikraus/u8g2/issues/843

Misiu commented 4 years ago

I'm trying to add support for this. I have 128x64 ST7920 display so I'll be able to test just this one (there are other sizes). I've created the first version by copying code for SSD1325 - https://github.com/Misiu/esphome/commit/a770bb10184c7f2a46e401eeaa4cd7be4716be44 I need some guidance with the setup code. I'm sure ST7920 is different from SSD1325, so that code must be changed. https://github.com/olikraus/u8g2 has support for that display - https://github.com/olikraus/u8g2/blob/master/csrc/u8x8_d_ist7920.c

What commands I should send to correctly set up the display? Where I should search for them? Manual (https://www.lcd-module.de/eng/pdf/zubehoer/st7920_chinese.pdf)?

@OttoWinter any hints?

Misiu commented 3 years ago

Ref: https://thesolaruniverse.wordpress.com/2020/06/09/esp8266-and-st7920-powered-12864-liquid-crystal-display-in-a-test-bench/ @kbx81 maybe you could help with this? 🙏

kbx81 commented 3 years ago

Yes, I can probably help. I'll take a look at your branch later today or tomorrow.

moskovskiy82 commented 3 years ago

Any update on this one? Also interested in this.

kbx81 commented 3 years ago

Sorry -- been distracted with some other project. I'll circle back before too much longer. 😇

nicolaij commented 3 years ago

Try it https://github.com/nicolaij/esphome_heater

Misiu commented 3 years ago

there is a PR: https://github.com/esphome/esphome/pull/1440 could you give this a try? I'm waiting for a new display so I can help with testing.

Misiu commented 3 years ago

@moskovskiy82 did you try the code from the PR I mentioned?

matphillips commented 3 years ago

any progress on this? I have one of these displays and it would be nice to put it to use. Thanks.

marsjan155 commented 3 years ago

My PR was merged https://github.com/esphome/esphome/pull/1440 My LCD works with this code, maybe someone else can check and confirm

matphillips commented 3 years ago

Oh, great! Recently too it seems! I'll be sure to check it when it's in release, but I'm not sure how to use the pre-release versions. If there's some instructions somewhere, I can try to test it today, but otherwise I'm find to continue to wait. Glad I didn't throw the screen away :)

kbx81 commented 3 years ago

Docs are here: https://next.esphome.io/components/display/st7920.html

Closing the FR since the component was merged and docs added. 😄🚀

marsjan155 commented 3 years ago

@matphillips check this https://esphome.io/guides/faq.html#how-do-i-use-the-latest-bleeding-edge-version