ColourSensor Class
Reports RGB and HSL values detected using TCS34725 I2C sensor. HSL values may give better results
when detecting colours. For each colour to detect, obtain reference values with the sensor close to the object,
and with the sensor further away. Compare readings against the range of reference values to identify the colour.
Namespace: RoboTx.ApiAssembly: RoboTx.Api (in RoboTx.Api.dll) Version: 1.0.0
public sealed class ColourSensor
Public NotInheritable Class ColourSensor
[<SealedAttribute>]
type ColourSensor = class end
- Inheritance
- Object ColourSensor
Disable |
Stops the colour sensor reporting colour values.
|
Enable |
Enables the colour sensor to report colour values, using integration time 50ms and gain of x4.
See overloaded method for specifying different integration time and gain values.
|
Enable(Int32, Int32) |
Enables the colour sensor to report colour values using specified integration time and gain.
|
GetHSL |
Gets the colour as H, S and L values reported by the colour sensor once it has been enabled.
How long it takes for colour values to start being reported, and the subsequent reporting interval
will depend in the integration time specified in the Enable method.
|
GetRGBC |
Gets the red, green, blue and clear values reported by the colour sensor once it has been enabled.
How long it takes for colour values to start being reported, and the subsequent reporting interval
will depend in the integration time specified in the Enable method.
|