Main Content

Generate Code and Deploy Model to Hardware

  1. Open the Simulink® editor.

  2. In the Modeling tab, in the Setup section, click Model Settings.

  3. In the Configuration Parameters dialog box, select Hardware Implementation and set Hardware board to Arduino® Mega 2560.

  4. On the Hardware tab of the Simulink model, in the Mode section, select Run on board and then click Monitor & Tune to run the model on the Arduino board.

    Observe the RGB color values picked up from the TCS34725 color sensor in their respective displays.

    model diagram with output