Using a rotary encoder with arduino mega and MATLAB

조회 수: 1 (최근 30일)
Derick Ghoda
Derick Ghoda 2017년 7월 28일
편집: Qais El-Bakaein 2018년 1월 17일
I've tried to run the following example code I obtained from mathwoks website ( https://www.mathworks.com/help/supportpkg/arduinoio/ref/rotaryencoder.html ). I get the following error when I try to create a rotary encoder object:
>> a = arduino('COM4','Uno','Libraries','rotaryEncoder');
Invalid value 'rotaryEncoder' for Libraries. Valid libraries are
'Adafruit/MotorShieldV2, I2C, SPI, Servo, ShiftRegister'.
Do I need to install something in order to use the rotary encoder library, if so what library should I install ? I've already installed the MATLAB and SIMULINK support packages for arduino. Thanks in advance for your help.
  댓글 수: 3
Derick Ghoda
Derick Ghoda 2017년 8월 2일
Thanks for your response, I never really understood where such an error was coming from until I was able to get my hands on R2017a.
Qais El-Bakaein
Qais El-Bakaein 2018년 1월 17일
편집: Qais El-Bakaein 2018년 1월 17일
Hey, i have the same problem and I have R2017b, what could the problem be? thanks

댓글을 달려면 로그인하십시오.

답변 (1개)

Akhilesh Thakur
Akhilesh Thakur 2017년 7월 31일
This feature is introduced in R2017a. Check the version. If you are unable to do that check this link https://www.mathworks.com/help/supportpkg/arduinoio/quadrature-encoders.html. You need to go through this there are sample examples that can help you.
Best Akhilesh

카테고리

Help CenterFile Exchange에서 MATLAB Support Package for Arduino Hardware에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by