How to operate i2c port for RTC(real time clock) when touch is being used?
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
It sounds like you're encountering a conflict with the I2C bus when trying to set the RTC in the loop section due to the touch panel. Make sure that the touch panel isn't blocking the I2C communication. You could try using a different I2C address for the RTC if available or ensure that your touch panel and RTC aren’t sharing the same address. Additionally, you might want to check the documentation for your specific touch display to see if there are any known issues or configuration settings to resolve this.
If you're looking for a break after troubleshooting, you might enjoy playing Stardew Valley free iOS. It's a great way to unwind!
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.