I2C Problem with capacitive touch
-
Hi,
I am trying to run some basic I2C connections in micropython to test out each of the sensors on the unit, however it appears the I2C bus fails any time the capacitive touch is used. i.e. I can connect to and extract the acceleration form the MPU6886 fine but the moment I touch the screen I get the error OSError: I2C bus error (19). forcing me to recreate the i2c variable.
Does anyone know how or why this might be happening or what I can do to fix it?
Thank you!
-
At least your touch 'works'. I'm on my second core2AWS and its totally dead.
They worked briefly and stopped. I'm totally lost!!
Good luck.
Bo W4GHV -
Hello @university123
could you post your code? Using UiFlow I've put together a simple program which reads the touch state and x and y coordinates of the MPU6886 in a loop just fine and I do not encounter any lockup when I touch the screen. See below:
from m5stack import * from m5stack_ui import * from uiflow import * from m5stack import touch import imu screen = M5Screen() screen.clean_screen() screen.set_screen_bg_color(0xFFFFFF) imu0 = imu.IMU() label0 = M5Label('Text', x=24, y=24, color=0x000, font=FONT_MONT_26, parent=None) label1 = M5Label('Text', x=23, y=86, color=0x000, font=FONT_MONT_26, parent=None) label2 = M5Label('Text', x=151, y=86, color=0x000, font=FONT_MONT_26, parent=None) while True: label0.set_text(str(touch.status())) label1.set_text(str(imu0.ypr[1])) label2.set_text(str(imu0.ypr[2])) wait_ms(2)
Thanks
Felix