🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    I2C Problem with capacitive touch

    Core2 for AWS
    3
    3
    3.6k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • U
      university123
      last edited by

      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!

      1 Reply Last reply Reply Quote 0
      • W4GHVW
        W4GHV
        last edited by

        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

        73, Bo W4GHV since '54

        1 Reply Last reply Reply Quote 0
        • felmueF
          felmue
          last edited by felmue

          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

          GPIO translation table M5Stack / M5Core2
          Information about various M5Stack products.
          Code examples

          1 Reply Last reply Reply Quote 0
          • First post
            Last post