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

    Pins in UIflow

    UIFlow
    3
    5
    7.2k
    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
      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
        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
          Kris @felmue
          last edited by Kris

          @felmue thanks,

          1 Reply Last reply Reply Quote 0
          • A
            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
              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
              • First post
                Last post