Arduino Encoder Application with Simulink Problem
조회 수: 3 (최근 30일)
이전 댓글 표시
Hi, I'm using the Arduino Support Package for Simulink Toolbox. My goal is to make a counter that counts up when it rotates clockwise and counts down when it rotates counterclockwise by using KY-040 Encoder. I can read all values appropriately. (Encoder has 2 output pins, OutA and OutB, and they produce digital signals.) My problem is to take the values I read from the OutA pin and compare them with the new values. Which blocks should I use for this?
댓글 수: 0
채택된 답변
J Chen
2020년 3월 2일
You can use Simulink Delay block which store you last data. Type delay in the search box in the Simulink Library Browser to locate the block.
댓글 수: 5
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Arduino Hardware에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!