matlab error while trying to connect servo motor through arduino

1 vue (au cours des 30 derniers jours)
india king
india king le 3 Mai 2016
Commenté : carlos gómez le 4 Août 2017
if true
a = arduino('com24', 'uno', 'Libraries', 'Servo');
s = servo(a, 'D8')
end
when i run this code i get an error Invalid pin format. Pin number must be a scalar integer.
i am using r2014a version.
Pls help me solve this error
  2 commentaires
Walter Roberson
Walter Roberson le 4 Mai 2016
What does a.AvailablePins show?
Cristhian Joel Iquiapaza Velarde
i have the same problem

Connectez-vous pour commenter.

Réponses (2)

Duaner
Duaner le 2 Juil 2016
I had the same error when trying to read voltage output readVoltage(a,'A1') Invalid pin format. Pin number must be a scalar integer. after messing around i found this to work: readVoltage(a,1)
ans =
4.9951

PRIYA RANJAN PATTANAIK
PRIYA RANJAN PATTANAIK le 4 Mar 2017
Modifié(e) : PRIYA RANJAN PATTANAIK le 4 Mar 2017
Try s = servo(a, 8)

Communautés

Plus de réponses dans  Power Electronics Control

Community Treasure Hunt

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

Start Hunting!

Translated by