nanoFramework.Iot.Device.RgbDiode
1.0.107
Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package nanoFramework.Iot.Device.RgbDiode --version 1.0.107
NuGet\Install-Package nanoFramework.Iot.Device.RgbDiode -Version 1.0.107
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.RgbDiode" Version="1.0.107" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add nanoFramework.Iot.Device.RgbDiode --version 1.0.107
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: nanoFramework.Iot.Device.RgbDiode, 1.0.107"
#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.RgbDiode as a Cake Addin #addin nuget:?package=nanoFramework.Iot.Device.RgbDiode&version=1.0.107 // Install nanoFramework.Iot.Device.RgbDiode as a Cake Tool #tool nuget:?package=nanoFramework.Iot.Device.RgbDiode&version=1.0.107
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
RGB diode - PWM
Library designed for controlling RGB diodes using PWM.
Functions
The binding supports the following sensor functions:
- Control of RGB diodes
- PWM-based color intensity management
Classes
- RgbDiode: Main class for RGB LED control
Usage
using Iot.Device.RgbDiode;
using System.Drawing;
const byte redGpioPin = 25;
const byte greenGpioPin = 27;
const byte blueGpioPin = 26;
// Uncomment for ESP32
// nanoFramework.Hardware.Esp32.Configuration.SetPinFunction(redGpioPin, nanoFramework.Hardware.Esp32.DeviceFunction.PWM1);
// nanoFramework.Hardware.Esp32.Configuration.SetPinFunction(greenGpioPin, nanoFramework.Hardware.Esp32.DeviceFunction.PWM2);
// nanoFramework.Hardware.Esp32.Configuration.SetPinFunction(blueGpioPin, nanoFramework.Hardware.Esp32.DeviceFunction.PWM3);
var pwm = new RgbDiode(redGpioPin, greenGpioPin, blueGpioPin);
pwm.SetColor(255, 0, 0); // Should display red
pwm.SetColor(0, 255, 0); // Should display green
pwm.SetColor(0, 0, 255); // Should display blue
pwm.SetColor(Color.LawnGreen);
pwm.SetColor(Color.OrangeRed);
pwm.SetColor(Color.Teal);
pwm.Transition(Color.FromArgb(0, 255, 0)); // Will fade blue to green
pwm.Transition(Color.FromArgb(255, 0, 0)); // Will fade green to red
Important: make sure you properly setup the PWM pins especially for ESP32 before creating the RgbDiode
.
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.Graphics.Core (>= 1.2.10)
- nanoFramework.System.Device.Pwm (>= 1.1.10)
- nanoFramework.System.Math (>= 1.5.43)
- nanoFramework.System.Threading (>= 1.1.32)
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.0.309 | 84 | 2/4/2025 |
1.0.292 | 78 | 1/31/2025 |
1.0.274 | 89 | 1/13/2025 |
1.0.233 | 123 | 12/16/2024 |
1.0.210 | 104 | 10/23/2024 |
1.0.202 | 99 | 10/16/2024 |
1.0.188 | 98 | 9/27/2024 |
1.0.168 | 105 | 8/28/2024 |
1.0.117 | 122 | 6/28/2024 |
1.0.107 | 97 | 6/14/2024 |
1.0.85 | 90 | 5/15/2024 |
1.0.42 | 241 | 3/5/2024 |
1.0.25 | 271 | 2/5/2024 |
1.0.18 | 299 | 1/30/2024 |
1.0.8 | 335 | 1/18/2024 |
1.0.7 | 326 | 1/18/2024 |