My custom arduino 1284p based PCB shown below, has an ESP-07s module as well as a wired Ethernet connection in addition to an RS485 link. (PCB not fully populated)
The basic function of the project is to measure load current from 4 channels of AC load.
It will be housed in a din-rail mounted box and installed inside the house distribution box.
The measured loads will be sent via MQTT to home assistant.
The idea is to use either Ethernet connection or WiFi depending whats available.
Obviously if Ethernet is available it should have priority over wifi.
My question is how to accommodate both in the sketch and chose to channel data to whatever link is available.
Yes i did exactly that.
I rarely use breadboards. At this level of complexity, they never work!
All my components including the mcu are SMT.
Besides, i have now enough hardware experience to avoid hardware mistakes most of the time. In any case i prefer to redesign the pcb in case of a mistake that cant be fixed otherwise.