A library for the CoolerMaster RGB LED Controller
Package | NuGet Latest | Downloads |
---|---|---|
Sander0542.CMLedController | ||
Sander0542.CMLedController.Abstractions | ||
Sander0542.CMLedController.Extensions | ||
Sander0542.CMLedController.HidLibrary |
There are currently two implementations of this library. The default library Sander0542.CMLedController
is using Device.Net
for its processing. The package Sander0542.CMLedController.HidLibrary
implements the HidLibrary
library for processing.
Package | Implementation | GitHub |
---|---|---|
Sander0542.CMLedController | Device.Net | Device.Net |
Sander0542.CMLedController.HidLibrary | HidLibrary | HidLibrary |
public async Task SetColorRed()
{
var provider = new LedControllerProvider();
var devices = await provider.GetControllersAsync();
foreach (var device in devices) {
await device.SetStaticAsync(Color.Red);
}
}
public void ConfigureServices(IServiceCollection services)
{
services.AddSingleton<ILedControllerProvider, LedControllerProvider>();
}