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

    I2C PINOUT QUESTION

    Scheduled Pinned Locked Moved Expansion Board
    wipy 2.0i2cexpansionboard
    6 Posts 4 Posters 2.3k Views 4 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
      mike632t
      last edited by mike632t

      Hi,

      I'm possibly being a bit dense but I have a WiPy 2.0 plugged into an expansion board and I can't figure out where to connect SCA and SCL.

      The pin-outs for the WiPy 2.0 indecate that SCA/SCL are on P9 and P10.

      But the pin-outs for the expansion board indecate that P9 and P10 are used for the button and the LED.

      They can't both be right can they? Or does this mean I can't use the I2C bus?

      From this post I can see how to change the pins used for SCA and SCL but don't understand the mapping from the WiPy pinout to the expansion board pinout. Which pin is P7 on the expansion board?

      Thanks

      Mike T.

      L 1 Reply Last reply Reply Quote 0
      • J Offline
        jmarcelino
        last edited by jmarcelino

        Yes you can change the pins used by I2C.

        From that post P7 is G14, the pins are in the same order on both boards, they're a direct match - P13 is G5, P14 is G4, P6 is G13, etc.

        Alternatively you can also remove the jumper labelled "LED" which removes it from the circuit. The button has no effect as long as you don't press it.

        M 1 Reply Last reply Reply Quote 0
        • L Offline
          livius @mike632t
          last edited by

          @mike632t
          as @jmarcelino say you can change it e.g.

          i2c= I2C(0, I2C.MASTER, baudrate=100000, pins=("P19", "P20"))
          

          think about people first, then computers

          1 Reply Last reply Reply Quote 0
          • M Offline
            mike632t
            last edited by mike632t

            Hmmm - With nothing connected I'd not expect to see any I2C devices but I get the following

            from machine import I2C
            i2c = I2C(0, I2C.MASTER, baudrate=100000, pins=("P19","P20"))
            i2c.scan()
            [8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119]
            

            Don't think this is right...

            Mike T.

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

              @mike632t What you see is just the effect that the ports are floating. Add pull-up resistors, and you should get an empty list.

              1 Reply Last reply Reply Quote 0
              • M Offline
                mike632t @jmarcelino
                last edited by

                @jmarcelino Thanks - that worked a treat (pull ups on P9/10 seem to be enabled by default which made life easier)

                Mike T.

                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