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

    Events during System-Time-Sleep

    UiFlow 2.0
    2
    3
    338
    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.
    • M
      mattjcuk
      last edited by

      Hi,

      I'm using a M5Paper to take environmental readings, once I've updated the screen with all the readings, I using the System-Time-Sleep to wait 1 minute before I take more readings. It seems to pause the whole system so if I press any buttons during this 1 minute it doesn't seem to register this.

      Is there a way or a better command to only make the sensors take a reading every x minutes but also register any button presses during this wait period (it doesn't have to do anything but just register so once the x minute is up I can then do something based on the button press).

      Kind regards,

      Matthew

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

        Hello @mattjcuk

        you could use a timer instead which doesn't block other events like buttons.

        Please see Project Zone example: M5Paper_Timer_And_Button_UIFlow2.0.8

        Thanks
        Felix

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

        M 1 Reply Last reply Reply Quote 0
        • M
          mattjcuk @felmue
          last edited by

          @felmue

          Hi @felmue, perfect, that is exactly what I needed, thank you.

          Many thanks,

          Matthew

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