フィルターのクリア

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

2 ビュー (過去 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 件)

コミュニティ

カテゴリ

Help Center および File ExchangeArduino Hardware についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by