read digital pin pulses
3 次查看(过去 30 天)
显示 更早的评论
how could I read digital pin pulses from arduino in matlab?
I mean by writing readDigitalPin(a,'D4')
it shows just 0 or 1
but I want to read pulses from this pin which connected with the phase of increamental encoder
0 个评论
回答(1 个)
Asad Mirza
2019-2-24
Digital pins only return values of 0 or 1. If you want to read voltage information from an incremental encoder it would have to be connected to an analog in pin and then you would have to use readVoltage.
7 个评论
Welid Benchouche
2022-9-15
but can matlab call an interrupt in matlab code ?not the external interrupt or detect increase in simulink, in matlab code.
另请参阅
类别
在 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!