Reading AnalogPin0 from Arduino UNO in Simulink

8 ビュー (過去 30 日間)
Frank
Frank 2015 年 11 月 29 日
回答済み: Esther 2015 年 11 月 30 日
Hello all! I am trying to make a Simulink program that works with EMG signals. Currently I am using an Arduino UNO with an Olimex-EKG/EMG shield to read the EMG signals. I am currently having troubles though reading these values into Simulink. I have been able to read the values off the Arduino using the readVoltage command for 'A0' in matlab but for some reason I cannot read the values when I try and use the Analog Input box for pin 0 in Simulink... Anyone know why this might be?
Thanks!

回答 (1 件)

Esther
Esther 2015 年 11 月 30 日
Hi Frank,
I'm supposing you want to acquire the signals and view them live in Simulink? For Simulink, to read values from the analog pins, you can either:
  • Set up serial communication (works on UNO) - here are two examples from File Exchange -
  1. Arduino Serial Data
  2. Arduino Serial Communication

カテゴリ

Help Center および File ExchangeMATLAB Support Package for Arduino Hardware についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by