Hello everyone! Hope you're well!
I was developing a project where I need to set a point2point network based on ESP-8266, on which, many ESP-8266 (using ESP-NOW protocol) will collect and send data from one to another untill it gets to the final one, where the data will be uploaded to a Google Sheets file, via Wi-Fi (thanks to IFTTT services).
So, as you may know to this point, ESP-NOW doesn't work simultaneously with Wi-Fi (at least, not easily), although, this is not a problem to me, since I don't need them to work at the same time.
This, because in my final ESP-8266, the one that receives all my data to upload it to the Google Sheets file, all I need to do is to activate/deactivate ESP-NOW or Wi-Fi according to what I need, which will go as shown below:
- Turn on ESP-NOW in my final board.
- Via ESP-NOW, I receive the data collected throughout the other circuits.
- Turn off ESP-NOW.
- Turn on Wi-Fi connection and connect to my Wi-Fi router.
- Upload the data using amn IFTTT service.
- Turn off Wi-Fi connection.
- Repeat.
And naturally, I know the documentation to activate the ESP-NOW and the Wi-fi connections, but don't know the ones to deactivate them (except for Wifi.disconnect(), but honestly, I don't know if that will work for me). I would thank a lot if you could grant them to me, or at least, tell me a more effective way to do it.
Another outcome for this situation I was thinking about, was to use a pair of ESP-8266 as the "final receiver", one that gets the data collected via ESP-NOW and sends it via wire to the second one (via RX and TX pins of the board), which will finally upload it to the Google Sheets file, but I don't now if there's a way to do such thing (i.e., send data through the ESP-8266 pins).
Anyway, I would appreciate any advice regarding this topic!