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

    GPIO rising/falling events

    Scheduled Pinned Locked Moved UiFlow 2.0
    3 Posts 3 Posters 1.6k 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.
    • A Offline
      adamm5
      last edited by

      I'm seeking to remotely monitor a solar pump using a Lora unit and AtomS3 Lite, and need to count pulses from a water meter's hall sensor.

      I see UIFlow1 provides blocks for capturing events on rising (or falling) GPIO inputs, which is what I need, however UIFlow1 won't work with this hardware. I can't find an equivalent on UIFlow2. Or is the PIN BTN 'is pressed' event effectively the same thing? Or do I need to do this in python?

      Adding to my confusion, I get the following from the M5 AI assistant:

      3. UIFlow2 Block Configuration
      Initialize Pin: Use the "Pin" block (under "Hardware") to set the pin number, mode (IN), and pull resistor.
      Set Interrupt: Use the "Pin Interrupt" block to select the trigger edge and assign a handler function (defined via the "Function" block).

      Thats exactly what I want...but there is not such "Pin Interrupt" block that I can find.

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

        I have exactly the same problem. I would like to create an interupt to detect GPIO pulses for my Temperature Controller.

        felmueF 1 Reply Last reply Reply Quote 0
        • felmueF Online
          felmue @SpyrosEfth
          last edited by

          Hi guys

          while there doesn't seem to be a Pin Interrupt block you can just put some code into an Execute mpy code block.

          I created an example showing interrupts use on Pins. You can find it in the UIFlow Project Zone called: M5AtomS3_GPIO_Interrupt_UIFlow2.4.0

          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