Read Arduino interrupt in MATLAB

3 ビュー (過去 30 日間)
G3123
G3123 2019 年 10 月 24 日
コメント済み: G3123 2019 年 10 月 24 日
can anyone explain how to read Arduino interrupt pin 13 into Matlab. When I use readDigitalPin(a,'D13') the program crashes. Thanks in Advance.
  2 件のコメント
Walter Roberson
Walter Roberson 2019 年 10 月 24 日
In theory that should work; it is even the example given in https://www.mathworks.com/help/supportpkg/arduinoio/ref/readdigitalpin.html
G3123
G3123 2019 年 10 月 24 日
Thank you for your response. I have a keypad connected to the Arduino and the Arduino connected to Matlab serial port. When I press a key in the keypad, an external interrupt reaches the 13th pin of Arduino. I need to monitor this pin in Matlab and whenever there's an interrupt, increment a value. I tried using the readDigitalPin command, but when I run the code, it shows "updating server code on board" for a long time and doesn't display anything.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeArduino Hardware についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by