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

    Connect a Gesture sensor paj7620u2 to an M5Paper

    Arduino
    2
    3
    3.0k
    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.
    • J
      jcarolinares
      last edited by

      Good morning

      I'm trying to connect the gesture sensor unit (https://shop.m5stack.com/collections/m5-sensor/products/unit-gesture-recognition-sensor-paj7620u2) to an M5 Paper.

      To do that I'm just using part of the code of the example but adapting it to the M5paper (just using the M5paper libraries) https://github.com/m5stack/M5Stack/blob/master/examples/Unit/GESTURE_PAJ7620U2/GESTURE_PAJ7620U2.ino

      Unfortunately it fails in the initialization of the sensor (begin function) More info https://github.com/m5stack/M5Stack/blob/master/examples/Unit/GESTURE_PAJ7620U2/GESTURE_PAJ7620U2.ino

      The example says to connect the sensor to port A (G21/G22) on an M5Core but the M5paper uses different pins, I've tried connecting the sensor in Port A, B and C with no success

      Any idea about how to solve this issue?

      the example works without any problem on an M5Stack fire!

      kind regards

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

        Hello @jcarolinares

        have a look at this thread explaining the internal I2C bus (using Wire) and external I2C bus (using Wire1) used in M5Paper. You'll need to modify the gesture library to use Wire1 (instead of Wire) with the GPIOs used on port A.

        Thanks
        Felix

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

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

          Hello @jcarolinares

          in case you are still looking for a solution. I've received my gesture unit and did a quick test. The library allows to pass the Wire1 instance so it's quite straight forward.
          See example here.

          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