Difference between revisions of "Component: Colour Sensor (Grove 101020341) (101020341) (Light)"
| (2 intermediate revisions by the same user not shown) | |||
| Line 5: | Line 5: | ||
|- | |- | ||
| width="20%" style="color:gray;" | Version | | width="20%" style="color:gray;" | Version | ||
| − | | | + | | 8.0 |
|- | |- | ||
| width="20%" style="color:gray;" | Category | | width="20%" style="color:gray;" | Category | ||
| Line 15: | Line 15: | ||
Based on the color sensor TCS34725FN with digital output I2C. Based on the 8*2 array of filtered photodiodes and 16-bits analog-to-digital converters, you can gain the color chromaticity of ambient light or the color of objects. Of the 16 photodiodes, 4 have red filters, 4 have green filters, 4 have blue filters and 4 have no filter(clear). With the synchronization input pin, external pulsed light source can provides precise synchronous conversion control. | Based on the color sensor TCS34725FN with digital output I2C. Based on the 8*2 array of filtered photodiodes and 16-bits analog-to-digital converters, you can gain the color chromaticity of ambient light or the color of objects. Of the 16 photodiodes, 4 have red filters, 4 have green filters, 4 have blue filters and 4 have no filter(clear). With the synchronization input pin, external pulsed light source can provides precise synchronous conversion control. | ||
| − | == | + | ==Version information== |
| − | + | Library Version, Component Version, Date, Author, Info | |
| + | |||
| − | |||
==Detailed description== | ==Detailed description== | ||
| Line 57: | Line 57: | ||
''<span style="color:red;">No additional examples</span>'' | ''<span style="color:red;">No additional examples</span>'' | ||
| + | |||
| + | |||
| + | |||
| + | |||
| Line 249: | Line 253: | ||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
| − | |||
| − | |||
| Line 276: | Line 278: | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
| − | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | | + | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections |
|- | |- | ||
|- | |- | ||
| Line 285: | Line 287: | ||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
| − | | width="90%" | | + | | width="90%" | Mode |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
|- | |- | ||
| − | + | | colspan="2" | Defines if the component will be used for Master or Slave communications. Master mode supports a software bitbanged I2C channel. Slave mode requires a hardware I2C peripheral to catch the communications from the Master. | |
| − | |||
| − | |||
| − | | colspan="2" | | ||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | ||
| Line 303: | Line 295: | ||
|- | |- | ||
| colspan="2" | Pin used for SDA (data signal) | | colspan="2" | Pin used for SDA (data signal) | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
| + | | width="90%" | SDA Remap Pin | ||
| + | |- | ||
| + | | colspan="2" | | ||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | ||
| Line 308: | Line 305: | ||
|- | |- | ||
| colspan="2" | Pin used for SCL (clock signal) | | colspan="2" | Pin used for SCL (clock signal) | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
| + | | width="90%" | SCL Remap Pin | ||
| + | |- | ||
| + | | colspan="2" | | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
| Line 318: | Line 320: | ||
| colspan="2" | Selects the simulation type for the component. Component GUI - Interacts with the panel to sense the colour of a object in close proximity to the sensor. I2C Injector - Performs the I2C commands allowing you to connect an injector component or view and debug the I2C communications. | | colspan="2" | Selects the simulation type for the component. Component GUI - Interacts with the panel to sense the colour of a object in close proximity to the sensor. I2C Injector - Performs the I2C commands allowing you to connect an injector component or view and debug the I2C communications. | ||
|} | |} | ||
| + | |||
| + | ==Component Source Code== | ||
| + | |||
| + | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_Colour_Sensor_I2C_Grove.fcfx FC_Comp_Source_Colour_Sensor_I2C_Grove.fcfx] | ||
| + | |||
| + | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_Colour_Sensor_I2C_Grove.fcfx FC_Comp_Source_Colour_Sensor_I2C_Grove.fcfx] | ||
Latest revision as of 14:13, 22 October 2025
| Author | Matrix TSL |
| Version | 8.0 |
| Category | Light |
Contents
Colour Sensor (Grove 101020341) component
Based on the color sensor TCS34725FN with digital output I2C. Based on the 8*2 array of filtered photodiodes and 16-bits analog-to-digital converters, you can gain the color chromaticity of ambient light or the color of objects. Of the 16 photodiodes, 4 have red filters, 4 have green filters, 4 have blue filters and 4 have no filter(clear). With the synchronization input pin, external pulsed light source can provides precise synchronous conversion control.
Version information
Library Version, Component Version, Date, Author, Info
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
CalculateLux
| CalculateLux | |
| Uses the RGB values stored in RAM from the last Sample to calculate the luminance in lux. | |
| Return | |
CalculateTemp
| CalculateTemp | |
| Uses the RGB values stored in RAM from the last Sample to calculate the colour temperature in degrees Kelvin. | |
| Return | |
ClearInterrupt
| ClearInterrupt | |
| Clears the interrupt flag allowing the device to interrupt again. | |
| Return | |
ControlInterrupt
DisableSensor
| DisableSensor | |
| Powers down the device to save power. | |
| Return | |
EnableSensor
| EnableSensor | |
| Powers up the device ready for taking colour readings. | |
| Return | |
Initialise
| Initialise | |
| Initialise the sensor configuration as set by the component properties. Sets the default intigration time and gain as well as enable the sensor. | |
| Return | |
ReadDataChannel
SampleSensor
| SampleSensor | |
| Reads the raw colour channels from the sensor and stores the readings into RAM to be collected by the ReadDataChannel macro. | |
| Return | |
SetGain
| SetGain | |
| Controls the gain. 0x00 = 1X 0x01 = 4X 0x02 = 16X 0x03 = 60X | |
| Setting | |
| Range: 0 to 3 | |
| Return | |
SetIntegrationTime
| SetIntegrationTime | |
| Controls the integration time. 0 = 700mS / 1 = 154mS / 2 = 101mS / 3 = 50mS / 4 = 24mS / 5 = 2.4mS | |
| Setting | |
| Range: 0 to 5 | |
| Return | |
Property reference
Component Source Code
Please click here to download the component source project: FC_Comp_Source_Colour_Sensor_I2C_Grove.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_Colour_Sensor_I2C_Grove.fcfx