To bring the
System object™ into Simulink®, follow these
Create a new Simulink model.
From the User-Defined Functions library, add the MATLAB System block to the model.
In the block, set the System object name to colorSensor.
Connect the blocks as shown.
In the next section, you will Generate Code and Deploy Model to Hardware.