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

    Esp now m5stickC problem

    UIFlow
    4
    5
    8.7k
    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.
    • G
      gianni
      last edited by gianni

      Hi, my name is Gianni and I'm an italian student. I have a problem with the m5stickC espnow. I have 2 m5stickC, 1 puppy and 1 potentiometer and my aim is to command the puppy with the potentiometer. The problem is that after a short time, the m5stick on the puppy does not receive the data. It is as if the buffer is clogged and can no longer read the data. Initially it works well, then suddenly it freezes. Do you have any idea? Do I have to load the code?Thank you all and sorry for my english.

      I have upload a video of the problem on this link:

      https://youtu.be/lna4hDC6cDY

      D 1 Reply Last reply Reply Quote 0
      • D
        Devilstower @gianni
        last edited by

        @gianni are you downloading the code or running it directly from UIFlow? I’ve had an issue where the same app will run for an extended period in one environment, but fail after a few minutes in the other.

        1 Reply Last reply Reply Quote 0
        • G
          gianni
          last edited by gianni

          @Devilstower i downloaded the code but it didn't work. anyway I tried to remove the code from the "receive" and it seems to work .. but i don't understand the reason :(

          1 Reply Last reply Reply Quote 0
          • R
            robalstona
            last edited by

            @gianni, you can try below code. Maybe help you. The function receiving data, saves received data into variables and only the LED blinks. Short code with the least delays possible. And the correct reading of data from these variables and their processing takes place in the main loop of the program. I created it for fast debug esp-now transmission. Tested it with uiflow 1.4.5 web and 1.4.2 firmware on stickc

            0_1591440613587_Screenshot_20200606-120611.jpg

            Transmiter code i wrote directly in python and looks that:

            import network, espnow
            import time
            import urandom

            #configure WIFI
            wlan = network.WLAN(network.STA_IF)
            wlan.active(True)

            #initialize espnow
            espnow.init()
            espnow.get_mac_addr()
            espnow.set_pmk('0000000000000000')

            #MAIN LOOP
            while True:
            color = urandom.randint(0, 360)
            #broadcast data as string
            espnow.broadcast(1, str(color) )
            #debug
            print('mac:',espnow.get_mac_addr(),'sent:', str(color) )
            time.sleep_ms(1000)

            1 Reply Last reply Reply Quote 0
            • P
              paulmunday87
              last edited by

              Hi all,
              Very curious to give something similar a go. Driving a 5V motor over ESP now using the Joystick Unit at the transmit end. 2 x M5 Stack.

              Anybody have a UI Flow file I can modify?

              Kind regards,
              Paul

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