MATLAB Answers

0

Having issue with Simulink connecting to Arduino

Asked by Kevin Graebner on 23 Apr 2019
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.

  0 Comments

Sign in to comment.

0 Answers