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

    Micropython M5Stamp Stamp I/O Help please?

    Micropython
    3
    7
    4.5k
    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.
    • ajb2k3A
      ajb2k3
      last edited by ajb2k3

      And another Micropython I2C help request.
      Is anyone using the Stamp IO expansion stamp?
      I'm having problems understanding how to control it and its not in UIFlow yet!

      UIFlow, so easy an adult can learn it!
      If I don't know it, be patient!
      I've ether not learned it or am too drunk to remember it!
      Author of the WIP UIFlow Handbook!
      M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

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

        Hello @ajb2k3

        on the document page the Stamp I/O Arduino examples point to the ExtIO2 unit examples.

        So, I'd try the UIFlow blocks for the ExtIO2 unit.

        Thanks
        Felix

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

        1 Reply Last reply Reply Quote 0
        • teastainT
          teastain @ajb2k3
          last edited by teastain

          @ajb2k3 0_1676521840017_E2409982-3342-41EE-952A-A694B8453C98_1_105_c.jpeg
          Adam, I nearly went mad getting this to work! Part of the problem was wrapping my brain around how it worked. It is a silly invention of little use, I say!
          I found a weakness in the library that prevented individual pin functions, like pin 1 input, pin 2 RGB, pin 3 output.
          Our friend felix edited the library header and did a pull request and now they are all individually selectable. This image is actually a short video, but I don't think I can upload it here. Imagine if you will, the LED blink-ing...
          However the examples were NOT updated and they still say "AllPinMode", so this is confusing.
          I realize this is C, but it might be illustrative for translation to UIflow?
          Terry

          Cheers, Terry!

          100% M5Stack addict with several drawers full of product!

          1 Reply Last reply Reply Quote 0
          • ajb2k3A
            ajb2k3
            last edited by

            @teastain @felmue I've read, reread and experimented in micropython and still get a problem trying to control it.
            Mind you I have a cold so my brain isn't at its best but every time I trying to i2c.write() it causes a Error19: ENOMEM meaning I'm doing something wrong.

            Something about access the registers is not working for me.

            UIFlow, so easy an adult can learn it!
            If I don't know it, be patient!
            I've ether not learned it or am too drunk to remember it!
            Author of the WIP UIFlow Handbook!
            M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

            1 Reply Last reply Reply Quote 0
            • ajb2k3A
              ajb2k3
              last edited by

              I think I may have broke it!0_1676567548176_Screenshot 2023-02-16 at 17.11.34.png

              UIFlow, so easy an adult can learn it!
              If I don't know it, be patient!
              I've ether not learned it or am too drunk to remember it!
              Author of the WIP UIFlow Handbook!
              M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

              1 Reply Last reply Reply Quote 0
              • ajb2k3A
                ajb2k3
                last edited by

                I found a clue to programming it. It is the EXTI/O2 Unit in a miniaturised form. Same hardware, firmware and address.

                UIFlow, so easy an adult can learn it!
                If I don't know it, be patient!
                I've ether not learned it or am too drunk to remember it!
                Author of the WIP UIFlow Handbook!
                M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

                1 Reply Last reply Reply Quote 0
                • ajb2k3A
                  ajb2k3
                  last edited by

                  Way hay I got it.
                  in micropython you use

                  i2c.writeto_mem(0x45, 0x00, b'\x01')
                  

                  to set the mode and then

                  i2c.writeto_mem(0x45, 0x10, b'\x01')
                  i2c.writeto_mem(0x45, 0x10, b'\x00')
                  

                  to turn each pin off and on it digital mode.

                  And I can conform that the EXT I/O 2 and the ExtI/O stamp are the same units!

                  UIFlow, so easy an adult can learn it!
                  If I don't know it, be patient!
                  I've ether not learned it or am too drunk to remember it!
                  Author of the WIP UIFlow Handbook!
                  M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

                  1 Reply Last reply Reply Quote 1
                  • First post
                    Last post