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

    GPIO rising/falling events

    UiFlow 2.0
    3
    3
    752
    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
      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
        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
          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
          • First post
            Last post