Navigation

    M5Stack Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. jhfoo
    3. Topics
    J
    • Continue chat with jhfoo
    • Start new chat with jhfoo
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups

    Topics created by jhfoo

    • J

      Creating an infinite async loop
      Micropython • • jhfoo

      4
      0
      Votes
      4
      Posts
      5725
      Views

      J

      @m5stack I will share pseudo-codes of the current implementation, which is stable so far: CycleTimer = Timer(-1) def main(): # init and connect mqtt client doCycle() def doCycle(): global CycleTimer # send stuff from mqtt # NOTE: do not use machine.lightsleep() as publish() is NOT synchronous # lightsleep() will block data from being sent CycleTimer.init(period=5000, mode=Timer.ONE_SHOT, callback=doCycle) NOTE: this is power-intensive; calling lightsleep() will cause uiflow's mqtt client to crash quickly.
    • J

      Wake up on pick-up
      M5 Stick/StickC • • jhfoo

      21
      1
      Votes
      21
      Posts
      47886
      Views

      @doublep hello, could you refer me to where you read that value from?
    • J

      Is m5mqtt.publish async?
      Micropython • • jhfoo

      1
      0
      Votes
      1
      Posts
      2693
      Views

      No one has replied

    • J

      How to disconnect fro m5mqtt?
      Micropython • • jhfoo

      1
      0
      Votes
      1
      Posts
      2543
      Views

      No one has replied

    • J

      Connect to Alexa
      Micropython • • jhfoo

      1
      0
      Votes
      1
      Posts
      2841
      Views

      No one has replied

    • J

      What does m5base.app_start() do?
      UIFlow • • jhfoo

      3
      0
      Votes
      3
      Posts
      3935
      Views

      J

      @robalstona Yes I get that. But WHY? As I mentioned earlier, this makes testing code uploads a pain.
    • J

      M5StickC: Graduating from UiFlow: writing Python via REPL
      UIFlow • • jhfoo

      4
      0
      Votes
      4
      Posts
      5459
      Views

      J

      @lukasmaximus Not to be taken as Thonny being an inferior app; my Windows has a lot of crap inside. It seems pymakr on VS Code is more reliable on my Windows. pymakr has its own quirks; one of which is refusing to download binary files (eg. images). Will wait for more motivation to revisit Thonny again.
    • J

      How to make M5StickC go into light sleep?
      UIFlow • • jhfoo

      5
      -1
      Votes
      5
      Posts
      7038
      Views

      J

      @m5stack Did a quick machine.deepsleep(10000) test and it seems to work! Will add more code to see how this extends battery life. Thanks!
    • J

      sleep commands
      Micropython • • jhfoo

      2
      1
      Votes
      2
      Posts
      3347
      Views

      J

      See solution here: https://forum.m5stack.com/topic/1953/how-to-make-m5stickc-go-into-light-sleep/2
    • J

      How to acquire and upload demo app?
      Micropython • • jhfoo

      19
      0
      Votes
      19
      Posts
      20262
      Views

      Upyloader, Mu and Thonny are all great tools with a nice GUI that you can use to transfer files to and from the flash of your device