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

    [Pytrack] Problem getting an extra I2C sensor working on different bus, pins

    Scheduled Pinned Locked Moved Expansion Board
    pytrackpytrack i2cpytrack bme280
    5 Posts 2 Posters 1.2k 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.
    • M Offline
      Marco den Hartog
      last edited by Marco den Hartog

      Hi all,

      I have a Pytrack and added a BME280 sensor as follows on the External IO Headers.

      VCC - Pin 3
      GND - Pin 1
      SCL - Pin 7 (P10)
      SDA - Pin 8 (P11)

      My code:

      i2c_env = machine.I2C(1, machine.I2C.MASTER, baudrate=400000, pins=('P11', 'P10'))
      

      What happens is that the program hangs on this initialization. Probably I misunderstand something with initializing the I2C on a different bus and pins.

      Thanks.

      X 1 Reply Last reply Reply Quote 0
      • X Offline
        Xykon administrators @Marco den Hartog
        last edited by

        @marco-den-hartog Have you tried adding external pull-ups on the bus.

        Christian Ehlers

        M 1 Reply Last reply Reply Quote 0
        • M Offline
          Marco den Hartog @Xykon
          last edited by

          @xykon Hi. Yes I tried that and also soldering it the SDA to PIN 6 (P9) and SCL to PIN 7 (P10). I am using the WiPy 3.0 with the latest firmware. When initializing it on I2C bus 1 is hangs. When I use bus 2 then the device crashes. Now I have connected the BME280 directly to the configured PINS on the Pytrack for I2C bus 0 and everything runs smoothly.

          Looks like there is something not correctly or on the Pytrack board or on the software side. My guess is on the software site because I get some voltage on the pins when using the External IO headers.

          X 1 Reply Last reply Reply Quote 0
          • X Offline
            Xykon administrators @Marco den Hartog
            last edited by

            @marco-den-hartog OK thanks for the update. I will investigate this further tomorrow as I do not have the necessary hardware at home.

            You can also try downloading an older firmware here: https://software.pycom.io/downloads/WiPy.html

            I'd suggest you try WiPy-1.17.0.b1.tar.gz first and then WiPy-1.16.0.b1.tar.gz

            Christian Ehlers

            M 1 Reply Last reply Reply Quote 0
            • M Offline
              Marco den Hartog @Xykon
              last edited by

              @xykon Hi I didnt't told you but have tried 1.16.0.b1 and 1.15.0.1 with both the same results. But with some wires soldered it is working fine.

              The following schema now is running:

              External IO Header :
              PIN 1 - GND
              PIN 4 - VCC 3V3 SENSORS

              Header(connected a wire underneath the board)
              P22 - SDA
              P21 - SCL

              I have now a working demo device for this week :)

              1 Reply Last reply Reply Quote 0

              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