russhughes / st7789_mpy

Fast MicroPython driver for ST7789 display module written in C
Other
553 stars 110 forks source link

[modified] twatch-2020-V2 : st7789 issue (and i2c too) #89

Closed picpic020960 closed 2 years ago

picpic020960 commented 2 years ago

Bonjour , I have twatch-2020-V1 and V2(GPS QUECTEL L76K ans SD card , not LORA) st7789 with micropython works fine on V1 but on V2 'hello world' show only vertical lines with some color (photo below) the delta config V1/V2 for st7789 is BL 12/25 (from little datasheet on the cover box) One idea of the reason ? thank's for help

(and i2c too) : touch is invalid on V2 with same pin as V1 ????

IMG_20221008_090945

picpic020960 commented 2 years ago

better with SoftSPI thanks to #67

picpic020960 commented 2 years ago

I send 4 pixels in the middle of screen : V1 : OK for the pixels and background color V2 : OK for the pixel , background color is bad , same as the above photo how to debug ? Thanks for diagnostic help

russhughes commented 2 years ago

I have not had any problems with the twatch-2020 v2. Make sure you are setting the display power to on with something like this:

import axp202c
axp = axp202c.PMU()
axp.enablePower(axp202c.AXP202_LDO2)
picpic020960 commented 2 years ago

Bonjour My V2 (with GPS and SD Card , not LORA) is Chip is ESP32-D0WDQ6-V3 (revision v3.0) axp202c is good , I see my four pixels at screen center. But the background color id bad ,as above photo . seems to bee color format issue ... some tricks ...

Edit : tested with your full micropython st7789 driver : [no apx202c in this script but screen is on - added apx202c : same behaviour ] I see 'hello world' and hes good background colors as burst , flash.

added sleep(0.1) , I see good screens blinking after three , four times bad black screen 'as photo above' then good screens blinkind and so and so. Rotation is good.

Arduino/platformio firmware works fine So I am stuck !

One idea ? MicroPython v1.19.1-292-g59e3348c1-dirty on 2022-09-04; TWATCH-2020 with ESP32 Type "help()" for more information.

some note in https://github.com/Xinyuan-LilyGO/TTGO_TWatch_Library/blob/master/CHANGELOG.md

(06.4.2022) Fixed increasing the I2C rate causing the backlight to turn on abnormally, only increasing the rate when initializing the sensor

picpic020960 commented 2 years ago

"I have not had any problems with the twatch-2020 v2." : can you test i2c.scan() for the touch screen (sda=23 , scl=32). in my V2, empty list [] so error in Ftouch script. Thanks for help

picpic020960 commented 2 years ago

[Résolvez] for I2C : for touche axp202 needs LDO2 , LDO3 and EXTEN for SPI OK but with lvgl with fliker and moise

picpic020960 commented 2 years ago

OK all the trick in the TTGO.h , initpower : translate in python and all is good : no noise on screen and i2c.scan() reliable !