Main Content

Sync Models by Using Arduino Connected I/O Board

This example shows how to synchronize models using an Arduino Connected I/O board with real time and using Simulink Desktop Real-Time running in Normal mode.

The model sends software-generated pulse-width modulation signal to Arduino pin 13 where it can be observed by an oscilloscope or visually by observing the LED connected to pin 13. The duty of the signal can be controlled by the attached knob control.

Open the Model

Open the model sldrtex_arduino. In the MATLAB Command Window, type:


Run the model

To run this model, use this setup:

#The model is currently configured for Arduino Mega 2560. If necessary, change the configuration to match your Arduino model. # Select the SIMULATION tab on the toolstrip. Use the "Run" button to start the simulation.

Note: This model requires Simulink Support Package for Arduino Hardware.