rzeldent / esp32-smartdisplay

PlatformIO library LVGL Drivers for Sunton Smart display boards (CYD Cheap Yellow Display). This library supports these boards without any effort. ESP32-2432S024N/R/C, ESP32-2432S028R/C, ESP32-3248S035R/C, ESP32_8048S070N/C
https://github.com/rzeldent/platformio-espressif32-sunton
GNU General Public License v3.0
385 stars 69 forks source link

Odd tearing on display #2

Closed edasque closed 1 year ago

edasque commented 1 year ago

Using the sample code at https://github.com/x821938/ESP32-2432S028R-arduino-platformio-simple-test that uses your drivers, I see odd artifacts on a ESP32-2432S028R. Any idea what could be causing it?

https://user-images.githubusercontent.com/219187/215879092-91acd49a-5d00-4e71-928f-2aeb31239679.MOV

rzeldent commented 1 year ago

Hi Erik,

I had the same and in my case it was out of the bounds of the display. However this does not seem to be the case. I cloned your sample and ran it here with the same version of the library from PlatformIo 1.0.3... No tearing... See attached video.

https://user-images.githubusercontent.com/7620231/215888618-7e6330c9-1b12-490c-bde7-8c8ff69b1bc1.mp4

Suggestions are:

Or maybe a register that is not correct?

If you find out something or have extra information please let me know so it can be fixed in the library.

BTW The current main has some minor updates but do not think this will resolve the issue. Code for the led has changed in the main version...

rzeldent commented 1 year ago

Hi Erik,

Did it help, lowering the SPI freq?

edasque commented 1 year ago

Sorry I was away for a few days. Neither worked, unfortunately. The frequency change nor changing the power supply (from my computer or a big power supply brick).

I'll try to run your code sample see if I can get that working well.

rzeldent commented 1 year ago

Still strange, any updates/findings?

maxbrito500 commented 1 year ago

Hi Rene, same issue with the same model mentioned above.

Just to let you know, I will continue debugging to try solve this.

Previously the LovyanGFX sample code managed to write well on the display,

Also had the issues (solved):

Your work is the most advanced on this model. Perhaps it would be possible to release a version for the Arduino IDE in ino format?

Many thanks for making this available!

rzeldent commented 1 year ago

Hi Max,

Still strange why this happens on some boards.. Maybe timing or another display? Someone had also a board that had the RGB switched to BGR. Or maybe timing? Please let me know if you find something. Maybe compare with LovyanGfx? Will also take a look again if I have time...

Kind regards,

Rene

P.S. There is a release on the platformIO registry: rzeldent/esp32_smartdisplay

maxbrito500 commented 1 year ago

Hello Rene,

Can confirm the switched BGR leds on the more recent model (ordered February 2023), had the same situation. Last night was possible to achieve a fully working project with touchscreen, display color, LovyanGFX and LVGL. The code was uploaded to this location: https://github.com/radio3-network/kit-ESP32-2432S028R/tree/main/ESP32_2432S028-LovyanGFX-LVGL

In the meanwhile I've learned about the smartdisplay being a library on platformIO. I'm a newbie, didn't knew it was a library and it is difficult for me to start a new project there (also new to C language, albeit long time Java). Maybe possible to provide a working template project with an LVGL button demo?

Thanks for looking into this topic Rene. From the projects I've seen related to this board your code is by far the most advanced and complete. The board is so cheap and useful, just too bad about the (inexistent) library support. Maybe we can convince the manufacturer to point into your repository as location for others to start too.

rzeldent commented 1 year ago

Hi Brito,

I made a demo project at https://github.com/rzeldent/esp32-smartdisplay-demo. Think this will help you a lot! Do not forget to define the settings in platformio.h!

Kind regards,

Rene

On Sat, Mar 11, 2023 at 9:51 PM brito @.***> wrote:

Hello Rene,

Can confirm the switched BGR leds on the more recent model (ordered February 2023), had the same situation. Last night was possible to achieve a fully working project with touchscreen, display color, LovyanGFX and LVGL. The code was uploaded to this location: https://github.com/radio3-network/kit-ESP32-2432S028R/tree/main/ESP32_2432S028-LovyanGFX-LVGL

In the meanwhile I've learned about the smartdisplay being a library on platformIO. I'm a newbie, didn't knew it was a library and it is difficult for me to start a new project there (also new to C language, albeit long time Java). Maybe possible to provide a working template project with an LVGL button demo?

Thanks for looking into this topic Rene. From the projects I've seen related to this board your code is by far the most advanced and complete. The board is so cheap and useful, just too bad about the (inexistent) library support. Maybe we can convince the manufacturer to point into your repository as location for others to start too.

— Reply to this email directly, view it on GitHub https://github.com/rzeldent/esp32-smartdisplay/issues/2#issuecomment-1465014738, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB2ENBYNRJBNAIKALRJJ3UDW3TQTPANCNFSM6AAAAAAUM4ZQNU . You are receiving this because you commented.Message ID: @.***>

maxbrito500 commented 1 year ago

Fantastic Rene!

It worked like a charm. First time tried with RGB and had mixed colors, second time went with BGR as option on platformio.ini and this worked as expected. After that went to try functions like smartdisplay_get_light_intensity() and again worked as expected.

Man, felt great to just program code that runs on the board rather than hunting down error messages for hours.

Thank you for that Rene, made a big difference.

rzeldent commented 1 year ago

You're welcome!