Meadow.Foundation.Leds.Pca9633
Pca9633 | |
---|---|
Status | |
Source code | GitHub |
Datasheet(s) | GitHub |
NuGet package |
Code Example
Pca9633 pca9633;
public override Task Initialize()
{
Resolver.Log.Info("Initialize...");
pca9633 = new Pca9633(Device.CreateI2cBus());
return base.Initialize();
}
public override Task Run()
{
//set the location of R,G,B leds for color control
pca9633.SetRgbLedPositions(redLed: Pca9633.LedPosition.Led2,
greenLed: Pca9633.LedPosition.Led1,
blueLed: Pca9633.LedPosition.Led0);
//set a single color
pca9633.SetColor(Color.Red);
Thread.Sleep(1000);
pca9633.SetColor(Color.Blue);
Thread.Sleep(1000);
pca9633.SetColor(Color.Yellow);
return base.Run();
}
Sample project(s) available on GitHub
Wiring Example
To wire a Pca9633 to your Meadow board, connect the following:
Pca9633 | Meadow Pin |
---|---|
GND | GND |
VCC | 3V3 |
SCL | D08 (SCL Pin) |
SDA | D07 (SDA Pin) |