nanoFramework.Iot.Device.Lp3943 1.1.864

Prefix Reserved
dotnet add package nanoFramework.Iot.Device.Lp3943 --version 1.1.864
                    
NuGet\Install-Package nanoFramework.Iot.Device.Lp3943 -Version 1.1.864
                    
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.864" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="nanoFramework.Iot.Device.Lp3943" Version="1.1.864" />
                    
Directory.Packages.props
<PackageReference Include="nanoFramework.Iot.Device.Lp3943" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add nanoFramework.Iot.Device.Lp3943 --version 1.1.864
                    
#r "nuget: nanoFramework.Iot.Device.Lp3943, 1.1.864"
                    
#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.
#addin nuget:?package=nanoFramework.Iot.Device.Lp3943&version=1.1.864
                    
Install as a Cake Addin
#tool nuget:?package=nanoFramework.Iot.Device.Lp3943&version=1.1.864
                    
Install as a Cake Tool

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.864 174 4/2/2025
1.1.852 177 3/11/2025
1.1.822 126 2/26/2025
1.1.772 117 2/4/2025
1.1.755 122 1/31/2025
1.1.737 99 1/13/2025
1.1.696 129 12/16/2024
1.1.673 135 10/23/2024
1.1.631 125 8/28/2024
1.1.570 126 6/14/2024
1.1.560 125 5/29/2024
1.1.548 135 5/15/2024
1.1.436 279 11/10/2023
1.1.329 189 5/26/2023
1.1.313 173 5/12/2023
1.1.297 191 5/3/2023
1.1.203 336 12/28/2022
1.1.141 416 10/25/2022
1.1.122 466 10/12/2022
1.1.114 421 10/8/2022
1.1.95 447 9/22/2022
1.1.87 511 9/15/2022
1.1.73 448 9/8/2022
1.0.25.2032 458 6/23/2022
1.0.1.39143 491 6/7/2022