Cannot program board Nano3
조회 수: 6 (최근 30일)
이전 댓글 표시
Hello,
I'm trying to connect Matlab with my Arduino Nano. I installed the hardware packages for arduino and try to run the following code to plot live voltage data:
clc
global a;
if ~isempty(instrfind)
fclose(instrfind);
delete(instrfind);
end
a=arduino('COM13','nano');
inverv=200;
init_time=1;
x=0;
while(init_time<interv)
b=readVoltage(a,'A0');
x=[x,b];
plot(x)
grid on
init_time=init_time+1;
end
If I run this code, I get an error message:
"Cannot program board Nano3 (COM2). Please make sure the board is supported and the port and board type are correct. For more information, see Arduino Hardware Troubleshooting."
With "a=arduino('COM13','nano','Trace', true);", I get the message (text file).
So, I tried to resolve the problem by installing the hardware package new, installing drivers, Arduino IDE new, changing COM port, try to run MATLAB as administrator...
Has anybody an idea, what the problem could be?
I can program the Arduino Nano with Arduino IDE...
댓글 수: 0
답변 (1개)
Madhu Govindarajan
2019년 4월 11일
I would recommend you try arduinosetup first and if that is successful, then connect with arduino using a=arduino instead of mentioning the port number manually.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Setup and Configuration에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!