esp32-c3-mini icon indicating copy to clipboard operation
esp32-c3-mini copied to clipboard

Support for Waveshare ESP32-S3 1.43inch AMOLED Display

Open cddmp opened this issue 10 months ago • 7 comments

Hi,

first of all thank you for all your work you put into this. Looks great to me! Withoug digging too much into the code, how difficult would it be to add this display: https://www.waveshare.com/esp32-s3-touch-amoled-1.43.htm

Edit: Use case would be primarily navigation.

cddmp avatar Jun 16 '25 09:06 cddmp

seems the configuration is almost similar to the Viewe boards https://github.com/fbiego/esp32-c3-mini/blob/07e8b48f353db3f37ad4a3cfb202aab5a4af1682/platformio.ini#L18

Can you try it? You may need to change pinout https://github.com/fbiego/esp32-c3-mini/blob/07e8b48f353db3f37ad4a3cfb202aab5a4af1682/hal/esp32/displays/pins.h#L169-L184

fbiego avatar Jun 21 '25 10:06 fbiego

Thanks for your reply, I really appreciate that!

I actually thought the same and tried the Viewe configuration yesterday. The building and flashing worked, but the display did not work.

I found this project which does a similar thing than you, but limited to Navigation: https://dhruv-pandey93.medium.com/turn-by-turn-navigation-on-small-displays-9ea171474095 https://github.com/pdhruv93/minimal-nav/tree/main He uses the ESP32-S3 1.43 inch Amoled display. The code includes a driver for the SH8601 (Amoled driver IC) and the FT3168 (touch controller), while the Viewe seems to use the CO5300 as well as the CST9217.

Now, what confuses me is, that Waveshare actually lists both display ICs. Seems they have different batches: Image

I do some research and come back to you.

cddmp avatar Jun 21 '25 10:06 cddmp

I see this display has an enable pin. Can you add the line below and try? #define LCD_EN 42

Image

fbiego avatar Jun 21 '25 10:06 fbiego

According to https://www.waveshare.com/esp32-s3-touch-amoled-1.43.htm I configured the display pins like that:

Image

When I reset the device it shows the ESP32 C3 Mini "Welcome" screen as well as date and weather afterwards. The display then turns off. This is how it looks like. Seems like the size does not fit?

Image

Image

Here is the serial log output. The touch driver is obvioiusly the wrong one.

Reconnecting to /dev/ttyACM0 .   Connected!
[  1687][E][TouchDrvCST226.cpp:300] initImpl(): Firmware info read error.
[  1694][E][Wire.cpp:137] setPins(): bus already initialized. change pins only when not.
[  1782][E][Wire.cpp:513] requestFrom(): i2cRead returned Error -1
[  2788][E][Wire.cpp:513] requestFrom(): i2cRead returned Error -1
[  3794][E][TouchDrvCST816.cpp:292] initImpl(): Chip ID does not match, should be CST816S:0XB4 , CST816T:0XB5 , CST816D:0XB6 , CST820:0XB7 , CST716:0X20
[  3807][E][Wire.cpp:137] setPins(): bus already initialized. change pins only when not.
[  3866][E][TouchDrvCST92xx.cpp:534] getAttribute(): Firmware info read error.
[INFO]: Starting up device
Setup FS failed
Drive S is ready
Total: 251100   Free: 74224     70.44%
[INFO]: Setup done
[INFO]: v6.0 [fbiego]
ESP32-S3
fc:01:2c:d9:8a:a1
[  6690][E][TouchDrvCST92xx.cpp:130] getPoint(): Write read command error
[  6759][E][TouchDrvCST92xx.cpp:130] getPoint(): Write read command error
[  6793][E][TouchDrvCST92xx.cpp:130] getPoint(): Write read command error

cddmp avatar Jun 21 '25 20:06 cddmp

Awesome, now that the display works next thing is to configure the touch driver. The display turns off after x seconds because its a setting in the UI, it's a feature and can be set to Always On

fbiego avatar Jun 22 '25 10:06 fbiego

I will have a look at the touch driver.

Edit: It seems as if sensorlib does not support the FT3168/FT6146. I could take the code provided by Waveshare for those controllers and check if I can integrate them into your code. Though the cleanest option might be to add it to sensorlib.

cddmp avatar Jun 22 '25 19:06 cddmp

I have a working proof of concept. I will report back.

cddmp avatar Jun 23 '25 10:06 cddmp