Create Project and Libraries Folder
Ensure to
Install the Arduino Support Package for Simulink
Download the TCS34725 color sensor library files
The standard folder structure for a device driver block contains a System object™ and source and include folders.
Create a device driver project folder using the
codertarget.createDriverProject
function.
codertarget.createDriverProject('colorSensor')
Check that these files and folders show in the device driver folder.
An include folder,
include
, for the C/C++ header files and additional librariesA source folder,
src
, for the C/C++ source codeA template System object for sink blocks,
Sink.m
A template System object for source blocks,
Source.m
Add a new folder, libraries
, in the colorSensor
folder, and add the downloaded TCS34725 color sensor
library files to this folder.
Right-click the colorSensor folder and select Add to Path > Selected Folders.
In the next section, you will Write Hardware Specific C/C++ Code.