🤖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

    Scheduled Pinned Locked Moved UiFlow 2.0
    3 Posts 2 Posters 1.5k 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.
    • M Offline
      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 Offline
        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 Offline
          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

          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