Adafruit Motor Shield MATLAB GUI

1 visualización (últimos 30 días)
Colm
Colm el 7 de Ag. de 2014
Hi all,
This is my first post.
I am currently building an xy gantry as a part of a project. I am using an Arduino Uno, an Adafruit Motor Shield, and 2 stepper motors. I have interfaced the Arduino with a MATLAB GUI and the connection is working great but what I am finding is that as I run the program I created I cannot run the 2 motors simultaneously. One axis moves the required steps and then once its finished the second moves. Its simple code but surely it should work?
function BeginButton_Callback(hObject, eventdata, handles)
% hObject handle to BeginButton (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global a;
a.stepperSpeed(1, 1);
a.stepperSpeed(2, 1);
a.stepperStep(1, 'backward', 'double',255);
a.stepperStep(2, 'forward', 'double', 255);
I've seen a cnc build on the arduino website where they speak of using a motor shield and sparkfun easy driver to drive the 3 motors but cannot get it to work myself.
Can anyone help me out on this one?
Thanks,
Colm

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