EspNow Add peer macaddress not possible with vairable
-
In the current UIFLow (offline version 1.0.18 of online version 1.10.1) it is impossible to add a ESPNow peer with the macaddress defined in a variable.
My goal is to dynamicly add peers, when de anounce themselfs to the 'server' after a broadcast.
FLow :- Server sends out a broadcast with a Json telling what kind of server it is.
- when a 'client' device receives an incomming message, the client directly gets the macaddress of the server in the "Receive mac_addre [addr] data [data]" method and thus should be able to stire the server macaddress and create a peer connection towards only that mac address, reserving this device for this server
- when the client has reserved the server on his side, it responses towards the server to let the server know what kind of device the client is (json data), and what mac address is has.
- this way, the server,n on his side, can comine the macadress with the device data to enable certain functions and know how to communicate (what json formats) with the client.
My goal :
- a M5Papaer as server
- multiple Atom Lites as clients, all with different setups, predifined in the program
So PLEASE, could you enable the 'macaddr' of the 'add peer' function as an variable and not yust a field that has to be fixated in code?
-
Hello @Luc3DSupplies
you could try to use an
Execute code:
block like this:BTW: The content of the
Execute code:
block can be found by adding theAdd peer
block and then switching to the Python tab.Note: Above code is untested.
Thanks
Felix