필터 지우기
필터 지우기

Arduino Encoder block drift issue with Arduino due

조회 수: 2 (최근 30일)
Osama Ahmad
Osama Ahmad 2024년 2월 21일
I am trying to get encoder values using the rotary Encoder block. The encoder is reading the ticks generated by a pendulum.It is working perfectly fine for Arduino Uno but for a Due board, it shows a drift in the aquired sensor value over time. the difference between the two results can be seen in the attached screenshots.
Uno:
Due:
Everything works fine if I use the Arduino IDE and the encoder library (therefore the Arduino Due hardware is working fine).
I am running the model in external mode with Arduino as target. Fixed time step of 0.001and solver selection is auto, no clash with pin map as i am using pin 2 and 3 for the signals A and B respectively.The simulation target and code generation languages are C. Using Matlab 2021b.
Is it a bug or am i doing soemthing wrong here?

답변 (0개)

카테고리

Help CenterFile Exchange에서 Modeling에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by