Difference between revisions of "Component: Colour Sensor (TCS3200) (Light)"
From Flowcode Help
Jump to navigationJump to search| Line 65: | Line 65: | ||
''<span style="color:red;">No additional examples</span>'' | ''<span style="color:red;">No additional examples</span>'' | ||
| + | |||
| + | |||
| Line 71: | Line 73: | ||
==Macro reference== | ==Macro reference== | ||
| + | ===SetConfig=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 89: | Line 92: | ||
| + | ===SetLEDOn=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 102: | Line 106: | ||
| + | ===SetFrequencyRange=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 120: | Line 125: | ||
| + | ===GetFrequency=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 133: | Line 139: | ||
| + | ===SetFilter=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 151: | Line 158: | ||
| + | ===SetLEDOff=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 164: | Line 172: | ||
| + | ===Initialise=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Revision as of 11:48, 3 February 2023
| Author | Matrix TSL |
| Version | 1.1 |
| Category | Light |
Contents
Colour Sensor component
This board provides the ability to detect colours using the TCS3200 sensor. It will return RGB and W values, dependent on the colour of the object under test.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_Colour_TCS3200.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_Colour_TCS3200.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
SetConfig
| SetConfig | |
| Sends the config data byte to the sensor using clock and data pins | |
| Data | |
| Return | |
SetLEDOn
| SetLEDOn | |
| Turn on the White LEDs | |
| Return | |
SetFrequencyRange
| SetFrequencyRange | |
| Dynamically change the sensor output frequency range to a new setting | |
| Freq | |
| Percentage range (2,20,100) | |
| Return | |
GetFrequency
| GetFrequency | |
| Samples and returns the sensor output frequency (Hz) | |
| Return | |
SetFilter
| SetFilter | |
| Dynamically change the sensor filter to RGB or W. Red = 0 Green = 1 Blue = 2 White = 3 | |
| FilterColour | |
| Filter Colour; Red = 0, Green = 1, Blue = 2 and White = 3 | |
| Return | |
SetLEDOff
| SetLEDOff | |
| Turn off the White LEDs | |
| Return | |
Initialise
| Initialise | |
| Initialise the sensor configuration as set by the component properties | |
| Return | |