Effacer les filtres
Effacer les filtres

How can I control a stepper motor in Matlab using Arduino?

4 vues (au cours des 30 derniers jours)
Ruchika Dongre
Ruchika Dongre le 17 Déc 2016
Réponse apportée : Shreshth le 17 Juil 2024 à 9:04
I'm using 2013b, so I found the package that I had to install, but for some reason it's not working using this code in Matlab:
a=arduino('COM3');
stepperSpeed(a,2,3);
stepperStep(a,2,'forward','single',10);
a.delete;
It recognizes the Arduino, but for some reason the stepper motor doesn't work. (I have motor_v2 installed on the board.) No fundamental errors are given, but when I remove the semicolons and look at the console, underneath the "Stepper Motor" Matlab is not conveying the number of steps that the stepper motor needs to do. (It's not a hardware issue, either, as I've run some example code in the Arduino software and it works fine.) I would greatly appreciate any help!

Réponses (1)

Shreshth
Shreshth le 17 Juil 2024 à 9:04
Dear Ruchika,
You can refer the below MathWorks documentation to understadn the process of using stepper motor in MATLAB using Arduino.
Hope it helps.

Communautés

Plus de réponses dans  Power Electronics Control

Catégories

En savoir plus sur Arduino Hardware dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by