Change the channel number for the entire network +Find the channel for the new node
Тhis is the sketch for the gate and the node (change node id and channel number). Made for the gate on the ESP, but to move into something else no problem. The node need a button to switch to the search mode of the channel (you have to hold down the button and click on reset or you can just connect the pin with ground). In normal mode node in the network receives the channel number from the gate through the broadcast, the new node itself begins to look for a channel (first looks at the number 76). For tests, if it is required to do the purification of memory through the standard sketch from the examples in the IDE, change the number which will be recorded in the cells instead of 0, it is necessary to specify 255. Please test and share their thoughts for improvement and optimization. I hope it will give impetus to further development.