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

2 次查看(过去 30 天)
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