You can prepare, configure, and run a model on your Arduino® hardware.
Before starting this procedure:
Connect your Arduino hardware to the host computer using a USB cable.
Create or open a Simulink® model.
To prepare and run the model:
Use File > Save As to create a working copy of your model. Keep the original model as a backup copy.
In your model, select Tools > Run on Target Hardware > Prepare to Run. This action changes the model Configuration Parameters.
When the Hardware Implementation pane opens, set the Hardware board parameter to the specific Arduino board you are using.
Click the Deploy to Hardware button.
This action automatically downloads and runs your model on the board.
If you want to use ENUM data in external mode with Arduino boards, use a built-in integer data type such as int8, uint8, int16, uint16, and int32 to derive the ENUM data. For more information, refer to http://www.mathworks.com/help/simulink/ug/defining-simulink-enumerations.html .