Receiving data with ESP Now in UIFlow

  • 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?

  • 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

  • @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!