- Uno, Nano, Mini, and other ATMega328-based boards - 2, 3
- Mega, Mega2560, MegaADK - 2, 3, 18, 19, 20, 21 (20 and 21 are not available when they are used for I2C communication)
- Micro, Leonardo, and other 32u4-based boards - 0, 1, 2, 3, 7
- Nano 33 IoT - 2, 3, 9, 10, 11, 13, A1, A5, A7
- Due - All digital pins
Is there a way to overwrite simulink encoder block pins?
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi! I'm having some issues using 'Simulink Support Package for Arduino Hardware' with my Arduino Uno and Arduino Motor Shield Rev3.
The support package includes a built in encoder block to read the position of a motor, however for the Uno it locks the encoder pins to Pin 2 and Pin 3, but the motor sheild uses pin 3 as pwm control for the motor duty cycle. I'm trying to use pins 2 and 4 for my encoder, leaving pin 3 for the pwm conrtrol, but the encoder block does not allow this.
Any support, advice, or workaround would be greatly appreciated.
댓글 수: 0
답변 (1개)
Dhruv
2023년 2월 21일
The best possible solution which could help work out this issue is trying to use a different microcontroller that has more available pins or a built-in hardware encoder interface. (I would recommend Arduino Mega or Due)
Following is the list of Arduino Board/Digital pins usable for interrupts:
댓글 수: 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!