How do I make two steppers run simultaneously with Matlab R2011a and Arduino ?

조회 수: 2 (최근 30일)
John
John 2014년 11월 8일
편집: John 2014년 11월 8일
Hello
I have an Arduino Uno and the Motor Shield V2 I'm able to control the two steppers with the speed and the rotation angle i want but not at the same time.The code i write at the MATLAB's M-File is this one:
% a=arduino('COM3');
a.stepperSpeed(1,10);
a.stepperSpeed(2,20);
a.stepperStep(1,'forward','single',48);
a.stepperStep(2,'forward','single',48);
The pde file that i upload the Arduino is the motor_V2.pde .
I tried to upload different pde but nothing happend.
Also I tried for Simulinks Support Package i read in another post, but the package is for MATLAB 2012 and I don't want run the motors from simulink.
Is there anyway way for run the motors simultaneously?
Thank you.

답변 (0개)

카테고리

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