Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Not find any i2c devices with Fipy Pytrack

    Scheduled Pinned Locked Moved Expansion Board
    4 Posts 2 Posters 45 Views 2 Watching
    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.
    • P Offline
      Paula Mancilla
      last edited by Paula Mancilla

      Hi, I'm trying to connect an mpu-9250/6500 in External IO Header to SDA = P10 and SCL= P9. When I do i2c.scan() I obtain an empty list [].

      I try to do the scan because I get I2C BUS ERROR everytime I implemented a code who uses the MPU9250.

      When I Scan the pytrack port P22 and P21 return me the list [8, 16, 30] that I assume that is GPS and Accelometer from pytrack, so I don't think my I2c is bad.

      with this code I'm read

      import time
      
      from machine import I2C, Pin
      from mpu9250 import MPU9250
      
      print(os.uname())
      
      #SDA SCL
      i2c = I2C(0, I2C.MASTER, pins=('P10','P9'), baudrate=400000)
      
      while True:
          devices = i2c.scan()
          print(devices)
          time.sleep(1)
      
      

      I tested with a multimeter the pins P10 and P9 pins from External I/O and I have 0 volt.

      Also tried with a multimeter the pins P2 and P5 and I have 3 Volts in both, when I scan those pins connected to my MPU I get an empty list.

      In addition I try to use only the FiPy alone conecting to Rx, Tx, 5V and Gnd and connect my MPU9250 to pins P22 and P21 and not found, only return [].

      Also I try with other MPU-9250 and not work.

      What's wrong? I would appreciate it very much if someone try to help.

      robert-hhR 1 Reply Last reply Reply Quote 0
      • robert-hhR Offline
        robert-hh @Paula Mancilla
        last edited by

        @Paula-Mancilla When you read 0 v it may have the reason that the pull-up resistors are missing, and you have to add them yourself. Some of the breakouts with sensors have these on the PCB, some not.

        P 1 Reply Last reply Reply Quote 0
        • P Offline
          Paula Mancilla @robert-hh
          last edited by

          @robert-hh Thank you for you response, I managed to scan my MPU-9250, but i2c.scan return more than ones devices. And this device changes through time.

          32a9651b-2b82-470f-b3e2-73a6a8aee6a1-imagen.png

          I only have conected MPU-9250. I try to read the values from MPU-9250 and I get an i2C BUS ERROR. Any idea?

          Greetings

          robert-hhR 1 Reply Last reply Reply Quote 0
          • robert-hhR Offline
            robert-hh @Paula Mancilla
            last edited by

            @Paula-Mancilla That indicates that the signal levels on SDA and SCL are not stable. Please check again the wiring and the pull-up resistors. Appropriate values are 10k - 1k Ohm.

            1 Reply Last reply Reply Quote 1

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post

            Pycom on Twitter

            Pycom