System - Ubuntu 18.04Matlab Version - R2019bDevice - Arduino Nano 3
I connected the arduino nano to the computer. Using matlab support for arduino package I am able to upload code successfully onto the nano. It also works with the regular arduino nano.
I then opened the arduino_getting_started found here
I changed the board to arduino nano 3.0 and selected the correct COM port /tty/USB0.
I am sure this is the correct COM port because it works with the matlab version.
When I pressed upload and deploy to board I encounter the error below.
AVR Memory Usage----------------Device: atmega328pProgram: 4252 bytes (13.0% Full)
(.text + .data + .bootloader)Data: 232 bytes (11.3% Full)(.data + .bss + .noinit)avrdude: stk500_recv(): programmer is not respondingavrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00avrdude: stk500_recv(): programmer is not respondingavrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00avrdude: stk500_recv(): programmer is not respondingavrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00avrdude: stk500_recv(): programmer is not respondingavrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00avrdude: stk500_recv(): programmer is not respondingavrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00avrdude: stk500_recv(): programmer is not respondingavrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00avrdude: stk500_recv(): programmer is not respondingavrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00avrdude: stk500_recv(): programmer is not respondingavrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00avrdude: stk500_recv(): programmer is not respondingavrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00avrdude: stk500_recv(): programmer is not respondingavrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00### Build procedure for model: 'arduino_gettingstarted' 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 set in the model matches the COM port name in the host. To change the host COM port 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 in the host, open a terminal and type ls /dev/ttyACM* in the terminal. Choose the name that corresponds to your board.
I've also tried manually bootloading the code onto the arduino using this command, which succeeded.
~/Documents/MATLAB/SupportPackages/R2019b/3P.instrset/arduinoide.instrset/arduino-1.8.8/hardware/tools/avr/bin/avrdude -C /home/vuwij/Documents/MATLAB/SupportPackages/R2019b/3P.instrset/arduinoide.instrset/arduino-1.8.8/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -carduino -P/dev/ttyUSB0 -b115200 -D -Uflash:w:$(pwd)/arduino_gettingstarted.hex
I've attached the exact slx which caused the problem.
Best Answer