Meadow.Foundation.ICs.DigiPots.Ds3502
Ds3502 | |
---|---|
Status | |
Source code | GitHub |
Datasheet(s) | GitHub |
NuGet package |
Code Example
protected Ds3502 ds3502;
public override Task Initialize()
{
Resolver.Log.Info("Initialize...");
ds3502 = new Ds3502(Device.CreateI2cBus(Ds3502.DefaultBusSpeed));
return base.Initialize();
}
public override Task Run()
{
for (byte i = 0; i < 127; i++)
{
ds3502.SetWiper(i);
Resolver.Log.Info($"wiper {ds3502.GetWiper()}");
Thread.Sleep(1000);
}
return base.Run();
}