I'm currently in a planning phase for a project. I want to read some sensor data over Modbus TCP, do some simple calculations on the Arduino and publish the results over MQTT. Which means I have 2 RJ-45s and two different protocols.
Given a Arduino Mega with an Ethernet shield. Does it work if I simply add a network switch and connect the sensor and an internet router to it, and use both protocols in parallel? Or are there any problems running such a thing on only one Arduino?