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

    UIFlow: How to try/except for "Connect to Wifi"?

    Scheduled Pinned Locked Moved General
    2 Posts 1 Posters 4.2k Views 1 Watching
    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.
    • W Offline
      wsanders
      last edited by

      I am trying to get the program to ignore failure to connect to WiFi. I tried to place a Wifi Connect block inside a try/except (with a bogus SSID/password):

      0_1650495158697_Screenshot_20220420_155223.png

      Instead, the program hangs, before the LED comes on, because the python that gets generated places the wifiCfg.doConnect up at the top of the program (line 20):
      0_1650495658652_Screenshot_20220420_160048.png
      and the try/except block is empty, much later in the program at line 87:
      0_1650495590491_Screenshot_20220420_155937.png

      Is there a way to create an exception for WiFi failure to connect?

      I also notice that UIFlow does not have a "pass" block. I just put a wait() in mine - ???

      W 1 Reply Last reply Reply Quote 1
      • W Offline
        wsanders @wsanders
        last edited by

        @wsanders SOLUTION: Use "Original Network Function" blocks instead.

        1 Reply Last reply Reply Quote 1

        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