Skip to content

Sander0542/Sander0542.CMLedController

Repository files navigation

Sander0542.CMLedController

Last commit License

A library for the CoolerMaster RGB LED Controller

Packages

Package NuGet Latest Downloads
Sander0542.CMLedController Current release Downloads
Sander0542.CMLedController.Abstractions Current release Downloads
Sander0542.CMLedController.Extensions Current release Downloads
Sander0542.CMLedController.HidLibrary Current release Downloads

Implementations

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

Usage

Simple

public async Task SetColorRed()
{
    var provider = new LedControllerProvider();
    var devices = await provider.GetControllersAsync();
    
    foreach (var device in devices) {
        await device.SetStaticAsync(Color.Red);
    }
}

Dependency Injection

public void ConfigureServices(IServiceCollection services)
{
    services.AddSingleton<ILedControllerProvider, LedControllerProvider>();
}

Contributors

https://github.com/Sander0542/Sander0542.CMLedController/graphs/contributors