Meadow.Foundation.ICs.IOExpanders.Pca9685
Pca9685 | |
---|---|
Status | |
Source code | GitHub |
Datasheet(s) | GitHub |
NuGet package |
Code Example
Pca9685 pca9685;
public override Task Initialize()
{
Resolver.Log.Info("Initialize...");
var i2CBus = Device.CreateI2cBus(I2cBusSpeed.FastPlus);
pca9685 = new Pca9685(i2CBus, new Meadow.Units.Frequency(50, Meadow.Units.Frequency.UnitType.Hertz), (byte)Pca9685.Addresses.Default);
pca9685.Initialize();
return base.Initialize();
}
public override Task Run()
{
var port0 = pca9685.CreatePwmPort(0, 0.05f);
var port7 = pca9685.CreatePwmPort(7);
port0.Start();
port7.Start();
return base.Run();
}
Sample project(s) available on GitHub
Wiring Example
To wire a PCA9685 to your Meadow board, connect the following: