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

    Pin mappings between GPy and Expansion board 2.0

    Scheduled Pinned Locked Moved GPy
    gpyi2c
    3 Posts 2 Posters 785 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.
    • S Offline
      sprasad
      last edited by

      I'm working on I2C with GPy. Which pins on the expansion boards do I have to use for SDA and SCL? Also, I'm aware that I can also define SDA and SCL pins of my choice and use them. But as I observe, definitions are in terms of Px and port numbers on Expansion board are in terms on Gx. Where can I find the mapping between port numbers of my GPy and Expansion board?

      sebS 1 Reply Last reply Reply Quote 1
      • sebS Offline
        seb @sprasad
        last edited by

        @sprasad

        You can specify pins using the GXX number directly like so:

        p = Pin(Pin.exp_board.G16, mode=Pin.OUT)
        

        If you want to use Pxx numbers in your code, just compare the expansion board pinout diagram and the module pinout diagram to see how they map

        1 Reply Last reply Reply Quote 0
        • S Offline
          sprasad
          last edited by

          That worked! Thank you..

          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