필터 지우기
필터 지우기

How to interact Matlab with Arduino and Motor Shield Rev 3?

조회 수: 1 (최근 30일)
Martin Velasquez
Martin Velasquez 2019년 3월 18일
Hello,
I've been trying sync up Matlab and Arduino (along with a rev 3 motor shield) in order to controlk a DC motor.
After creating an arduino object, along with the add on object.
As specified below, the problem comes when creating a dcmotor object.
Is there a way to get past this? and
Are there libraries available specifically for this shield?
Thanks for reading.
a=arduino('COM6','Uno','Libraries'{'Adafruit/MotorShieldV2','I2C','RotaryEncoder'});
mot=addon(a,'Adafruit/MotorShieldV2');
% Here is where I have trouble
dcm= dcmotor(mot,'port'); % I cannot specify a port
% What I mean is that the Rev3 motor shield does not specifiy "M1" or "M2" insead it uses "Channel A and B" so this is a problem

답변 (0개)

커뮤니티

더 많은 답변 보기:  Power Electronics Community

카테고리

Help CenterFile Exchange에서 Arduino Hardware에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by