Effacer les filtres
Effacer les filtres

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

2 vues (au cours des 30 derniers jours)
Martin Velasquez
Martin Velasquez le 18 Mar 2019
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

Réponses (0)

Communautés

Plus de réponses dans  Power Electronics Control

Catégories

En savoir plus sur Arduino Hardware dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by