Run Model on Arduino Hardware
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 the Simulink model, on the Modeling tab, click Model Settings to open the Configuration Parameters dialog box.
When the Hardware Implementation pane opens, set the Hardware board parameter to the specific Arduino board you are using.
On the Hardware tab of the Simulink model, in the Mode section, select
Run on boardand then click Build, Deploy & Start.
This action automatically downloads and runs your Simulink 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 Define Simulink Enumerations.