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.
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.
MATLAB cannot run on android or iOS. There is a "MATLAB Mobile" interface that can allow those to act as displays for remote MATLAB (to some extent.) There are sensor packages for the two that can send data to MATLAB sessions. There are Simulink blocks that can be used to create models that deploy to android, and other Simulink blocks that can be used to create models that deploy to iOS.
The android sensors package and the iOS sensor package use UDP (I think) to send to MATLAB sessions. You can tell the sensor packages on the phones to send to an arbitrary IP address and port. But I do not recall seeing the format of the packets documented, or the protocol for instructing which sensors are to be sent.
Best Answer