Meadow.Foundation.ICs.IOExpanders.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();
}
Sample project(s) available on GitHub
Wiring Example
To wire a Ds3502 to your Meadow board, connect the following:
Ds3502 | Meadow Pin |
---|---|
GND | GND |
VCC | 3V3 |
SCL | D08 (SCL Pin) |
SDA | D07 (SDA Pin) |