Skip to main content

Class Pca9633

Represents a Pca9633 led driver

Assembly: Pca9633.dll
View Source
public class Pca9633 : II2cPeripheral

Implements:
Meadow.Hardware.II2cPeripheral

Properties

DefaultI2cAddress

The default I2C address for the peripheral

View Source
public byte DefaultI2cAddress { get; }

LedRed

Red LED location - used for RGB control

View Source
public Pca9633.LedPosition LedRed { get; set; }

LedGreen

Red LED location - used for RGB control

View Source
public Pca9633.LedPosition LedGreen { get; set; }

LedBlue

Red LED location - used for RGB control

View Source
public Pca9633.LedPosition LedBlue { get; set; }

IsOn

Turn led controller output on or off

View Source
public bool IsOn { get; set; }

Fields

i2cComms

I2C Communication bus used to communicate with the peripheral

View Source
protected readonly II2cCommunications i2cComms

Methods

Wake()

Put device into active state

View Source
public void Wake()

Sleep()

Put device into sleep state

View Source
public void Sleep()

SetRgbLedPositions(LedPosition, LedPosition, LedPosition)

Helper method to set RGB led positions for color control

View Source
public void SetRgbLedPositions(Pca9633.LedPosition redLed, Pca9633.LedPosition greenLed, Pca9633.LedPosition blueLed)
Parameters
TypeNameDescription
Meadow.Foundation.Leds.Pca9633.LedPositionredLedred led position
Meadow.Foundation.Leds.Pca9633.LedPositiongreenLedgreen led position
Meadow.Foundation.Leds.Pca9633.LedPositionblueLedblue led position

SetColor(Color)

Set RGB LED color if red, green and blue LEDs are set

View Source
public void SetColor(Color color)
Parameters
TypeNameDescription
Meadow.ColorcolorColor

SetLedBrightness(LedPosition, byte)

Set brightness of an individual led

View Source
public void SetLedBrightness(Pca9633.LedPosition led, byte brightness)
Parameters
TypeNameDescription
Meadow.Foundation.Leds.Pca9633.LedPositionledled position
System.Bytebrightnessbrightness (0-255)

SetGroupBrightess(byte)

Set brightness of all leds

View Source
public void SetGroupBrightess(byte brightness)
Parameters
TypeNameDescription
System.Bytebrightnessbrightness (0-255)

SetDriveMode(DriveType)

Set the drive mode Open drain or totem pole

View Source
public void SetDriveMode(Pca9633.DriveType drive)
Parameters
TypeName
Meadow.Foundation.Leds.Pca9633.DriveTypedrive

SetAutoIncrementMode(AutoIncrement)

Set auto increment mode of control registers

View Source
public void SetAutoIncrementMode(Pca9633.AutoIncrement mode)
Parameters
TypeName
Meadow.Foundation.Leds.Pca9633.AutoIncrementmode

Implements

  • Meadow.Hardware.II2cPeripheral