Adafruit Motor Shield MATLAB GUI

조회 수: 2 (최근 30일)
Colm
Colm 2014년 8월 7일
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

답변 (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