Borrar filtros
Borrar filtros

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

2 visualizaciones (últimos 30 días)
Martin Velasquez
Martin Velasquez el 18 de Mzo. de 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

Respuestas (0)

Comunidades de usuarios

Más respuestas en  Power Electronics Control

Categorías

Más información sobre Arduino Hardware en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by