MATLAB: Is it possible to acquire sensor data from multiple Arduinos or microcontrollers in Simulink

simulink

Is it possible to acquire sensor data from multiple Arduinos or microcontrollers in Simulink?

Best Answer

One possible way of connecting multiple Arduinos and acquiring the sensor data is by deploying a standalone code into each of the Arduinos and using Wi-Fi module to transmit the sensor information via TCP/IP blocks or UDP blocks . The standalone application must contain "TCP/IP Send" or "UDP Send" blocks.
TCP Send:
https://www.mathworks.com/help/supportpkg/arduino/ref/tcpipsend.html
On the host computer, the user must create a Simulink model with "TCP Receive" blocks and specify the right port number and IP address to connect to the specific Arduinos. If the connections are successful , the user should be able to view and record the sensor information.
TCP Receive:
https://www.mathworks.com/help/supportpkg/arduino/ref/tcpipreceive.html
Related Question