Skip to main content

Meadow.Foundation.Sensors.Light.Alspt19

Alspt19
Status
Source codeGitHub
NuGet package

Code Example

The following example shows how to initialize a Alspt19 sensor and print its readings on a console output:

public class MeadowApp : App<F7Micro, MeadowApp>
{
public MeadowApp()
{
Alspt19315C sensor;

public MeadowApp()
{
Initialize();

Task.Run(async () =>
{
while(true)
{
Console.WriteLine($"Voltage: {await sensor.GetVoltage()}");
await Task.Delay(500);
}
});
}

void Initialize()
{
Console.WriteLine("Init...");

sensor = new Alspt19315C(Device, Device.Pins.A01);
}


}
}

Sample projects available on GitHub