Difference between revisions of "Component: Colour Sensor (TCS3200) (Light)"
From Flowcode Help
Jump to navigationJump to searchLine 15: | Line 15: | ||
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. | 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 | + | ==Component Source Code== |
− | + | Please click here for the component source code: [https://www.flowcode.co.uk/wikicopy/componentsource/FC_Comp_Source_Colour_TCS3200.fcfx FC_Comp_Source_Colour_TCS3200.fcfx] | |
==Detailed description== | ==Detailed description== | ||
+ | |||
+ | |||
Line 26: | Line 28: | ||
==Examples== | ==Examples== | ||
+ | |||
+ | |||
Line 185: | Line 189: | ||
|- | |- | ||
| colspan="2" | Length of time period used to sample the sensor frequency (longer is more accurate) | | colspan="2" | Length of time period used to sample the sensor frequency (longer is more accurate) | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|} | |} |
Revision as of 17:45, 9 November 2022
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 for the component source code: FC_Comp_Source_Colour_TCS3200.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Downloadable macro reference
![]() |
SetConfig |
Sends the config data byte to the sensor using clock and data pins | |
![]() |
Data |
![]() |
Return |
![]() |
SetLEDOn |
Turn on the White LEDs | |
![]() |
Return |
![]() |
SetFrequencyRange |
Dynamically change the sensor output frequency range to a new setting | |
![]() |
Freq |
Percentage range (2,20,100) | |
![]() |
Return |
![]() |
GetFrequency |
Samples and returns the sensor output frequency (Hz) | |
![]() |
Return |
![]() |
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 |
Turn off the White LEDs | |
![]() |
Return |
![]() |
Initialise |
Initialise the sensor configuration as set by the component properties | |
![]() |
Return |