Having issue with Simulink connecting to Arduino

3 views (last 30 days)
in simulink i am trying to put down a few digital inputs which i have buttons hooked up to on the arduino board with drop down resistors.
however when i try to upload a program with a few digital pins and a scope it gives me this error.
i have went to simulate, model configuration, hardware implimentation. tried setting the com port manually. the correct board is selected. tried uninstaling then reinstalling the latest matlab and simulink support for arduino.
the kicker is, when following the engineering tutorial exactly, it worked just fine. but i tried this to expand the educational experience and it wont work.
please let me know what i'm doing wrong! thank you!
Simulation
3 1
Clear
07:18 AM Elapsed: 26 sec
### Starting build procedure for model: untitled
Code Generation
1
Elapsed: 22 sec
AVR Memory Usage ---------------- Device: atmega328p Program: 19560 bytes (59.7% Full) (.text + .data + .bootloader) Data: 864 bytes (42.2% Full) (.data + .bss + .noinit)
### Build procedure for model: 'untitled' aborted due to an error.
The following error occurred during deployment to your hardware board: Could not connect to specified Arduino board. Verify that the board is connected to your host, and that the host COM port number set in the model matches the COM port number in Windows. To change the host COM port number in the model, click 'Simulation ', click 'Model Configuration Parameters'... In the dialog that opens, select the 'Hardware Implementation' pane, click 'Target hardware resources > Host-board connection' and set the COM port number. To find out the COM port number in Windows, open Device Manager and open your board in the COM ports group.
  1 Comment
Prashant
Prashant on 9 Oct 2019
I just spent last 4 hours trying to do the same thing with different arduino boards and with different Matlab installs ( windows and linux) but nothing worked. I did manage to troubleshoot some of the issues but then gave up on Matlab and switch to Python envoirnment. I purchased Matlab home edition to ise it for hobby projects but i feel like i am spending more time making this software work then actually working on the projects.

Sign in to comment.

Answers (0)

Categories

Find more on Arduino Hardware in Help Center and File Exchange

Products


Release

R2019a

Community Treasure Hunt

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

Start Hunting!