Hi Ahmed,
This example that shows how to use Simulink Support Package for Arduino Hardware to send and receive serial data with Arduino hardware might help in troubleshooting:
Thanks

Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!