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

    Receiving data with ESP Now in UIFlow

    General
    3
    3
    7.8k
    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.
    • C
      clocey
      last edited by

      I am trying to do some simple testing with passing integers/numbers from one M5StickC to another using ESPNOW. Can anyone show me how receive data?

      world101W 1 Reply Last reply Reply Quote 0
      • A
        ardo
        last edited by

        Hi, you should't use the variables "addr" and "data" as shown in the snippets
        I think it should work like this:0_1599424919910_058d9528-c151-4ed4-83ef-9a3481853dfc-image.png

        1 Reply Last reply Reply Quote 0
        • world101W
          world101 @clocey
          last edited by world101

          @clocey

          Here is a simple flow that you can program on each M5StickC device that will send (Tx) and receive (Rx) a counter value using ESPNow.

          0_1599570461544_Screen Shot 2020-09-08 at 9.04.04 AM.png

          I'm using broadcast to send the counter values, so will send data to all devices listening on the ESPNow network.

          To make it point-to-point, you could use the "Add peer" block with the mac address of the other device within the flow and then use the "Send message with id" block to send data to only a specific device by its mac address.
          0_1599571417811_Screen Shot 2020-09-08 at 9.17.31 AM.png

          If you had more than two devices on the ESPNow network, you would add multiple "Add peer" blocks (also changing the mac and ID values for each one) and multiple "Receive mac_address" blocks (also adding the specific mac you want to receive data from) to distinguish who was sending the data and who could receive the data.

          Hope this helps!

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