Open the Simulink® editor.
In the Modeling tab, in the Setup section, click Model Settings.
In the Configuration Parameters dialog box, select Hardware Implementation and set Hardware board to Arduino® Mega 2560.
On the Hardware tab of the Simulinkmodel, in the Mode section, select
Run on board and then click
Monitor & Tune to run the model on the
Observe the RGB color values picked up from the TCS34725 color sensor in their respective displays.