フィルターのクリア

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 Center および File ExchangeModeling についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by