ESP32 5" HMI i2c port with touch
I was trying to use the board in the title to make an interface for a heating device.
Basically, i have to measure an analog temperature sensor, control a few relays and read the time from an RTC module.
My idea was to use i2c based modules to do so under Arduino, specifically:
- DS3231 Adafruit RTC module
- ADS1115 Adafruit 16bit ADC
- 2x MCP23017 Adafruit GPIO modules
What i realized is that while all these use the Wire.h library, when using LovyanGFX a different i2c library is internally used to drive the GT911 capacitive touch driver ic breaking the Wire.h functionality.
Is there a way to either use Wire.h for LovyanGFX or disable the touch functionality for a "brief" time freeing up the i2c bus or do I have to rewrite every module library to use the same library LovyanGFX uses?
Thanks in advance.
Comments
Hi S1m0n3,
I hope you are doing well. Thank you for reaching out. Sorry for the inconvinience caused.
Our technical support team is currently looking into the issue in your message. Please be patient, and we will get back to you as soon as possible.
Thanks! Have a nice day!
Hi S1m0n3,
You can completely disable touch, freeing up the I2C pins. Do not initialize the touch object. Or comment out the touch.begin() call in setup). Do not bind the touch read function. Then LovyanGFX will not "grab" the I2C bus anymore.
Thanks!