ESP32-C3 with integrated GC9A01 - cheap touch controller

I like the idea of the couch armrest mounted controller, and my media chairs have USB power ports in the recliner button assembly. Switch the lights out, control the pause/play.

To get it really nice I would be forced to do some radical surgery on media chairs.

Permission will be denied. But I may be able to do something…

It was from the aliexpress listing. Just checked and the file isn’t there any more (http://pan.jczn1688.com/directlink/1/ESP32%20module/1.28inch_ESP32-24245012.zip). I’ll see if I can find the original and host it somewhere. Update - can find it here: ZFile

1 Like

So have you lost it?

Nope. See above.

Trying to compile a micropython bin with lvgl libs included.
get stuck

If you want to try the steps are pretty easy

  • install idf
  • install micropython lgvl

If only it worked :slight_smile:
step 1 is ok
I get the error when building lvgl enabled version (step 2)

1 Like

Good luck, and keep us posted! Personally I’d like to have this working just using standard esphome for simplicity. I think we are very close - “just” need to get the driver migrated. Might not initially be able to support everything like swipe but if we can at the very least get touch working then that will be a huge step forward. I’ll try to set aside some time to look at it again this weekend.

I think this would be better if we can get openhasp to run on it. With the CST816D.h and CST816D.cpp files there may be a chance. Thanks for those.

Definitely don’t want to discourage you - agree that it would be nice to have that as an option. The ESP32-C3-Mini-1U does have a fairly decent 4MB of flash but the processor is also a pretty weedy single core with 400KB of sram and 384KB rom so I suspect it will struggle with openhasp. But again, go for it & let us know if you have any luck! :slight_smile:

tonight I will try esphome custom component.
the library I saw (your link) exposes x,y coords clicks (single double long) and swipe
so if it goes it goes completely

I get the following in the logs

[   313][E][esp32-hal-spi.c:227] spiAttachMISO(): SPI Does not hESP-ROM:esp32c3-api1-20210207
Build:Feb  7 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0xc (SPI_FAST_FLASH_BOOT)
Saved PC:0x4206a9d2
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd6100,len:0x438
load:0x403ce000,len:0x918
load:0x403d0000,len:0x24e4
entry 0x403ce000
[   305][E][esp32-hal-spi.c:227] spiAttachMISO(): SPI Does not have default pins on ESP32C3!

then nothing else.
However the display works (gif cycles)
Any clue?

Can you post the code you’re using to load the driver(s) as a custom component? If it’s complaining about SPI issues then that sounds like you’re also loading the screen driver as a custom component rather than the touch screen driver (which is i2c) and maybe you need to also pass to it the GPIO pins that it should use (which did take me a bit of mucking around to identify!). Could of course load both as custom components, but I’d just keep the screen driver using the gc9a01 external component as we know that at least works and try getting the touch screen driver working as a custom component

FYI I’ve submitted a feature request to see if there is someone a little more experienced at this than I am who may be willing to either help or at least point us towards a guide for converting the driver we have…

2 Likes

upvoted on GitHub

To Cut the chase I flashed your exact code (apart wifi etc…)
Same result: no log and same error message.
Weird.
And now the weirdest part.
No logs on Chrome
Logs on Safari.

go figure it, as the error seems coming from esphome and have nothing to do eith the browser

1 Like

Hallo guys, I got one of the aliexpress sold ready to go devices on ESP32 + ILI9341 2.4 TFT and CST820 Capacitive touch displays.
Managed to compile and upload working openHASP, but fighting with capacitive touch now.
Any ideas?

Welcome to the club:-)

1 Like

You’ll have to patch openhasp with drivers for that touch controller.

1 Like

I wısh I could know how to do that. I have tried to add those drıvers ınto DRV directory, but it did not worked.

Post an issue or feature request on the openhasp GitHub repo.

Done, thanks