How to operate i2c port for RTC(real time clock) when touch is being used?

edited October 2024 in Elecrow HMI Display

I can read & set RTC value in the setup. But I want to set RTC for an operation in the loop section which i am not able to do and i think it is because of the touch connected with the i2c which is not allowing to use i2c bus. I have already tried using Wire.beginTransmission, semaphoreMutex, etc but not able to set the rtc.

I am using Elecrow 7inch touch panel display.

Comments

  • I tried in the loop to read RTC but I2C port is continuously being used by the touch panel so it gives garbage value of RTC. Touch address and RTC address are different I have check using I2C scanner but the touch doesn't give time to read RTC properly. I am using 7inch Elecrow display the have given 2 ports of same I2C bus which actually of no use.


  • Hello Dhyey, re-initialize the IIC bus each time you use RTC. And change the pin in the picture to the corresponding pin of the IIC. After using RTC, it is best to re-initialize touch.

Sign In or Register to comment.