nanoFramework.Iot.Device.Lp3943 1.1.436

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
dotnet add package nanoFramework.Iot.Device.Lp3943 --version 1.1.436
NuGet\Install-Package nanoFramework.Iot.Device.Lp3943 -Version 1.1.436
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="nanoFramework.Iot.Device.Lp3943" Version="1.1.436" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add nanoFramework.Iot.Device.Lp3943 --version 1.1.436
#r "nuget: nanoFramework.Iot.Device.Lp3943, 1.1.436"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install nanoFramework.Iot.Device.Lp3943 as a Cake Addin
#addin nuget:?package=nanoFramework.Iot.Device.Lp3943&version=1.1.436

// Install nanoFramework.Iot.Device.Lp3943 as a Cake Tool
#tool nuget:?package=nanoFramework.Iot.Device.Lp3943&version=1.1.436

Lp3943 LED driver

The LP3943 is an integrated device capable of independently driving 16 LEDs. It uses I2C.

Documentation

Lp3943 eval board example back side Lp3943 eval board example front side

Usage

Important: make sure you properly setup the I2C pins especially for ESP32 before creating the I2cDevice, make sure you install the nanoFramework.Hardware.ESP32 nuget:

//////////////////////////////////////////////////////////////////////
// when connecting to an ESP32 device, need to configure the I2C GPIOs
// used for the bus
Configuration.SetPinFunction(21, DeviceFunction.I2C1_DATA);
Configuration.SetPinFunction(22, DeviceFunction.I2C1_CLOCK);

For other devices like STM32, please make sure you're using the preset pins for the I2C bus you want to use.

I2cConnectionSettings settings = new I2cConnectionSettings(1, Lp3943.DefaultI2cAddress);
I2cDevice device = I2cDevice.Create(settings);

using var ledDriver = new Lp3943(device, resetPin);

// Dim LEDs 0 to 7 at 1 Hz at 25% duty cycle
ledDriver.DimRegister(DimRegister.Dim0, 1, 25);

// Dim LEDs 8 to 15 at 5 Hz at 50% duty cycle
ledDriver.DimRegister(DimRegister.Dim1, 5, 50);

// Set LEDs 12, 13, 14, 15 off
ledDriver.SetLed(
	new[] { 12, 13, 14, 15 },
	LedState.Off
);

// Set LEDs 0, 1, 2, 3, 4, 5 on
ledDriver.SetLed(
	new[] { 0, 1, 2, 3, 4, 5 },
	LedState.On
);

// Set LEDs 6, 7, 8 to be powered by Dim register 0
ledDriver.SetLed(
	new[] { 6, 7, 8 },
	LedState.Dim0
);

// Set LEDs 9, 10, 11 to be powered by Dim register 1
ledDriver.SetLed(9, LedState.Dim1);
ledDriver.SetLed(10, LedState.Dim1);
ledDriver.SetLed(11, LedState.Dim1);
Product Compatible and additional computed target framework versions.
.NET Framework net is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.436 227 11/10/2023
1.1.329 141 5/26/2023
1.1.313 122 5/12/2023
1.1.297 137 5/3/2023
1.1.203 281 12/28/2022
1.1.141 371 10/25/2022
1.1.122 399 10/12/2022
1.1.114 366 10/8/2022
1.1.95 384 9/22/2022
1.1.87 445 9/15/2022
1.1.73 384 9/8/2022
1.0.25.2032 391 6/23/2022
1.0.1.39143 422 6/7/2022