Hi,
The error message indicates that the data type of the signal coming from your Arduino is uint16, but the input port of the simulation expects a double data type. To resolve this error, you need to convert the uint16 data type to double data type before sending it to the input port.
You can use the "Data Type Conversion" block in Simulink to convert the data type of the signal.
- Drag and drop the "Data Type Conversion" block from the Simulink Library Browser to your Simulink model.
- Connect the output of your Arduino block to the input of the "Data Type Conversion" block.
- In the "Data Type Conversion" block parameters, set the output data type to double.
- Connect the output of the "Data Type Conversion" block to the input port of the simulation block.
After completing these steps, the error should be resolved and your simulation should run without any issues.