SimulinkでArduinoのA/D変換値をリアルタイムキャプチャする

http://www.element14.com/community/thread/32223/l/arduino-uno-serial-comms-to-simulink?displayFullThread=true

2つのSimulinkブロック間でシリアル値を渡すらしい

  • 1. Enable External Mode in Simulink. Note: Arduino Uno is not supported for external mode due to its processing power. Arduino Mega 2560 and Due both support external mode.
  • 2. Build two Simulink models: First one will be downloaded to the Arduino, and the second one runs on the PC> The first one includes a “Serial Transmit” block for Arduino that gets the data sent through serial port. Download the first one to Arduino. The second one includes a “Serial Receive” block in which the COM number is set to the Arduino’s. Run this model on the PC (instead of downloading it to Arduino) and look at the signal in a Scope or Save to Workspace.
  • 3. Use Arduino Support from MATLAB (aka Arduino IO). Note: Unlike the previous two approaches, the algorithm runs on the PC instead of the Arduino (tethered solution).

追記:RoTHのSimulation機能を使うと上の方法より簡単にできた