nanoFramework.Iot.Device.Lp3943
1.1.673
Prefix Reserved
dotnet add package nanoFramework.Iot.Device.Lp3943 --version 1.1.673
NuGet\Install-Package nanoFramework.Iot.Device.Lp3943 -Version 1.1.673
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.673" />
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.673
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: nanoFramework.Iot.Device.Lp3943, 1.1.673"
#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.673 // Install nanoFramework.Iot.Device.Lp3943 as a Cake Tool #tool nuget:?package=nanoFramework.Iot.Device.Lp3943&version=1.1.673
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Lp3943 LED driver
The LP3943 is an integrated device capable of independently driving 16 LEDs. It uses I2C.
Documentation
- Lp3943 datasheet
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 | Versions 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.
-
- nanoFramework.CoreLibrary (>= 1.15.5)
- nanoFramework.System.Device.Gpio (>= 1.1.41)
- nanoFramework.System.Device.I2c (>= 1.1.16)
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.673 | 79 | 10/23/2024 |
1.1.631 | 92 | 8/28/2024 |
1.1.570 | 89 | 6/14/2024 |
1.1.560 | 94 | 5/29/2024 |
1.1.548 | 103 | 5/15/2024 |
1.1.436 | 259 | 11/10/2023 |
1.1.329 | 161 | 5/26/2023 |
1.1.313 | 140 | 5/12/2023 |
1.1.297 | 160 | 5/3/2023 |
1.1.203 | 305 | 12/28/2022 |
1.1.141 | 379 | 10/25/2022 |
1.1.122 | 424 | 10/12/2022 |
1.1.114 | 385 | 10/8/2022 |
1.1.95 | 410 | 9/22/2022 |
1.1.87 | 473 | 9/15/2022 |
1.1.73 | 408 | 9/8/2022 |
1.0.25.2032 | 414 | 6/23/2022 |
1.0.1.39143 | 443 | 6/7/2022 |