Jump to content

Component: Colour Sensor (EBM018) (EBM Modules): Difference between revisions

From Flowcode Help
No edit summary
No edit summary
Line 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 Pack==
==Component Source Code==


SENSORS
Please click here for the component source code: [https://www.flowcode.co.uk/wikicopy/componentsource/FC_Comp_Source_EBM018v2.fcfx FC_Comp_Source_EBM018v2.fcfx]


==Detailed description==
==Detailed description==


''No detailed description exists yet for this component''
''No detailed description exists yet for this component''


==Examples==
==Examples==




Line 186: Line 190:
|-
|-
| 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) 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections'''
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations'''
|-
|}
|}

Revision as of 17:46, 9 November 2022

Author Matrix TSL
Version 1.1
Category EBM Modules


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_EBM018v2.fcfx

Detailed description

No detailed description exists yet for this component

Examples

Sample program using the EBM018 - Colour sensor

Sets filter to RGB and W and reads values,displays on LCD

EBM018 Example


Downloadable macro reference

SetConfig
Sends the config data byte to the sensor using clock and data pins 
- BYTE Data
 
- VOID Return


SetLEDOn
Turn on the White LEDs 
- VOID Return


SetFrequencyRange
Dynamically change the sensor output frequency range to a new setting 
- BYTE Freq
Percentage range (2,20,100) 
- VOID Return


GetFrequency
Samples and returns the sensor output frequency (Hz) 
- UINT Return


SetFilter
Dynamically change the sensor filter to RGB or W. Red = 0 Green = 1 Blue = 2 White = 3 
- BYTE FilterColour
Filter Colour; Red = 0, Green = 1, Blue = 2 and White = 3 
- VOID Return


SetLEDOff
Turn off the White LEDs 
- VOID Return


Initialise
Initialise the sensor configuration as set by the component properties 
- VOID Return



Property reference

Properties
SDA
Pin used for sending serial configuration data to the sensor device 
SCL
Pin used as clock pin for sending serial configuration data to the sensor device 
Sensor Output
Pin used to monitor the output frequency from the light sensor 
Output Frequency Range
Initial sensor output frequency range selection. 100% 0-500KHz 20% 0-100KHz 2% 0-10KHz 
Filter Option
Initial filter selected 
LED Control
Initial White LED state 
Sample Time Period
Length of time period used to sample the sensor frequency (longer is more accurate)