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

    Pins in UIflow

    Scheduled Pinned Locked Moved UIFlow
    5 Posts 3 Posters 8.9k Views
    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.
    • K Offline
      Kris
      last edited by

      Which physical pins on the M5stack and M5stick correspond to pins 0-5 in UIflow?

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

        Hi @Kris

        that is entirely up to you - pin0-4 are just variables.

        In UIFlow use the first statement to initialise the desired GPIO (0-36) to be used with one of the 5 variables (pin0-4).

        MicroPython example: variable pin0 is used for GPIO18:

        pin0 = machine.Pin(18, mode=machine.Pin.IN, pull=machine.Pin.PULL_UP)
        

        Cheers
        Felix

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

        K A 2 Replies Last reply Reply Quote 0
        • K Offline
          Kris @felmue
          last edited by Kris

          @felmue thanks,

          1 Reply Last reply Reply Quote 0
          • A Offline
            Alex28 @felmue
            last edited by

            @felmue
            if i want to use more than 5 pins,what shall I do ?

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

              Hello @Alex28

              in the end pin0 - pin4 are simply Micropython variables, so either switch to the Micropython tab or use Execute code blocks to add more pinX variables.

              Thanks
              Felix

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

              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
              • First post
                Last post