- Make sure your Arduino is connected to the correct COM port.
- In Simulink, go to Hardware Settings > Target Hardware Resources > Host-board connection > Set the correct COM port (it should match the one in Device Manager).
- The Arduino IDE Serial Monitor, or another application may be using the COM port.
- Close the Arduino IDE and make sure only MATLAB/Simulink is using the COM port.
- By default, Simulink external mode uses 115200 baud.
- If you manually change it in the model or Arduino, make sure both matches. Arduino must be compiled with the same baud rate.
