esp32 5 inch display WZ8048C050 - how to connect buttons and leds
Hi!
I just bought the https://www.elecrow.com/esp32-display-5-inch-hmi-display-rgb-tft-lcd-touch-screen-support-lvgl.html
How can i connect 4 buttons and 4 leds to the board? I want to be able to control them from the esp32 micro controller. Are there any GPIO-'s free ? Which ones ?
What is the GPIO_D Digital and artificial I/O interface ? Can i use that one to connect buttons and leds ? And if yes, do i need extra hardware? What kind?
Thank you for your answers!
Tagged:
Comments
Hi @mgaelcrow ,
Sincerely sorry that due to the limited GPIO interface of ESP32, the available ports are only GPIO_D (IO38) and UART0. I'm afraid it is difficult to connect 4 buttons and 4 LEDs.
Thank you for your answer. Besides de IO38 , is there not any other GPIO i can use? I need one more for the i2c protocol so i could connect a i2c port exander like this: https://www.hobbyelectronica.nl/product/mcp23017-esp-i2c-poort-expander/ . Maybe pin 27 - IO0 used for the boot button? After booting, that pin can do something else?
hello@mgaelcrow
Due to the utilization of the I2C by the touch functionality, we have run out of available I2C interfaces. We deeply regret any inconvenience this may have caused.
I have just been looking at these products and have also spotted the big problem with there being only 1 available GPIO. It makes it very difficult to connect anything to these devices.
So my question is, can the TF Card pins be reallocated in software to be GPIO / UART etc. and then use an SD card sniffer board (very cheap on eBay / AliExpress) to access the signals? e.g. could the card chip select signal be reallocated then with IO38 maybe a UART could be could be created to allow it communicate with another microcontroller?
Thanks :)
But the I2C interface is a bus, so i could connect another I2C device on the same bus and control the leds and read the buttons, right?
@mgaelcrow - could you use a DS2408 on IO38? Dunno, just a thought :)
one wire protocol?
interesting. do you have code examples ?
I have yet to implement 1-wire on the ESP32 platform, but I've used it on other microcontrollers (predominantly with ibuttons). It's just bit-bashing really. A quick Google pointed me to this GitHub - DavidAntliff/esp32-owb: Maxim One Wire Bus driver for ESP32. Looks like good place to start...
I guess there might be something you could do with the SPI bus connected to the card slot - there are some SPI based I/O expanders.
Overall though, having only one pin spare does seem like a massive limitation and kind of rules it out for the project I had in mind. Oh well.
Yes, you can try that.
thanks! i will try!