Characteristic Locus
Inheritance System.Object > Tcs3472x
Inherited Members System.Object.ToString() System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.ReferenceEquals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone()
Namespace Meadow.Foundation.Sensors.Light
Assembly Tsc3472x.dll

Syntax

public class Tcs3472x

Constructors

Tcs3472x(II2cBus, Byte, Double, Tcs3472x.GainType)

Declaration
public Tcs3472x(II2cBus i2cBus, byte address = 41, double integrationTime = 0.7, Tcs3472x.GainType gain = Tcs3472x.GainType.Gain60X)

Parameters

Type Name Description
II2cBus i2cBus
System.Byte address
System.Double integrationTime
Tcs3472x.GainType gain

Properties

Device

Get the type of sensor

Declaration
public Tcs3472x.DeviceType Device { get; }

Property Value

Type Description
Tcs3472x.DeviceType

Gain

Set/Get the gain

Declaration
public Tcs3472x.GainType Gain { get; set; }

Property Value

Type Description
Tcs3472x.GainType

IntegrationTime

Set/Get the time to wait for the sensor to read the data Minimum time is 0.0024 s Maximum time is 7.4 s Be aware that it is not a linear function

Declaration
public double IntegrationTime { get; set; }

Property Value

Type Description
System.Double

IsClearInterrupt

Get true if RGBC is clear channel interrupt

Declaration
public bool IsClearInterrupt { get; }

Property Value

Type Description
System.Boolean

IsValidData

Get true is there are valid data

Declaration
public bool IsValidData { get; }

Property Value

Type Description
System.Boolean

Methods

GetColor(Boolean)

Get the color

Declaration
public Task<Color> GetColor(bool delay = true)

Parameters

Type Name Description
System.Boolean delay

Wait to read the data that the integration time is passed

Returns

Type Description
System.Threading.Tasks.Task<Color>

SetInterrupt(Tcs3472x.InterruptState, Boolean)

Set/clear a specific interrupt persistence This is used to have more than 1 cycle before generating an interruption.

Declaration
public void SetInterrupt(Tcs3472x.InterruptState interupt, bool state)

Parameters

Type Name Description
Tcs3472x.InterruptState interupt

The percistence cycles

System.Boolean state

True to set the interrupt, false to clear

SetInterrupt(Boolean)

Set/Clear the colors and clear interrupts

Declaration
public void SetInterrupt(bool state)

Parameters

Type Name Description
System.Boolean state

true to set all interrupts, false to clear