Comments (2)
Hey, first of all I'd like to make sure, that you're aware that this library is still in heavy development (even if it doesn't seem so - I'm a bit short on time lately) and will definitely have breaking api-changes in the near future.
Settings things up to use it right now is a bit tricky. I think the best way is the following:
- Clone and build the solution.
- Run the pack_all.bat in the NuGet directory
- Add the NuGet-directory as a local nuget-repository (you can do that by adding a nuget.config to the solution directory of the solution you want to use it in https://gist.github.com/DarthAffe/c2f3cfa7af30e4d94025ac314e029b40)
- Install the packages you want to use (You need core and the device-packages for all devices you want to use, I recommend the brushes, groups and decorators package - but that depends on what you want to do).
If this is done using the library is quite simple:
The first thing you need is the surface. You can get it from the static property RGBSurface.Instance.
You can configure how the library updates the devices but I'd recommend to only change the UpdateMode to Continuous and leave everything as is, as long as you don't have any problems with how it works by default.
You'll need to load your devices once (application start or something similar) by calling LoadDevices in the surface.
It doesn't matter if a device of a provider is connected so I personally just call everything like this:
RGBSurface surface = RGBSurface.Instance;
surface.Exception += args => Debug.WriteLine(args.Exception.Message));
surface.LoadDevices(AuraDeviceProvider.Instance); // This one can cause some trouble right now
surface.LoadDevices(CorsairDeviceProvider.Instance);
surface.LoadDevices(LogitechDeviceProvider.Instance);
surface.LoadDevices(CoolerMasterDeviceProvider.Instance);
surface.LoadDevices(NovationDeviceProvider.Instance);
After that you can access all loaded devices trough the Devices-enumerable on the surface.
Now the decisions depends more on how you want to work with the library. If you want to work surface-based you should loop through all devices and set their location to represent your table layout, if you want to work strictly device-based you can skip this step.
Lighting something up now is quite easy. Just create a group containing all the leds you want to use for one specific thing and apply a brush and if needed decorators (some sort of effects) to make something fancy. Just browse through the preset-projects to see what is currently available and how they are implemented (if you want to create your own).
You can also check https://github.com/DarthAffe/KeyboardAudioVisualizer/tree/master/KeyboardAudioVisualizer as an example project, but the device-access thing done there is not really good so it might not be the best reference :(
If you need any more information feel free to ask :)
from rgb.net.
This is exactly what i needed, thanks man!
I noticed that you are busy and there are many thing to make in the API yet, but i think that contributing is better than reinventing the wheel, if i face any bugs or need something implemented i'll talk to you and ask for directions for pull-requests.
Thanks, this library is shaping to be perfect to my Arduino LED project, loving it.
from rgb.net.
Related Issues (20)
- Update corsair sdk
- Add a setting to choose if OpenRGB devices should be split into zones HOT 9
- Add PID for SteelSeries Rival 5 HOT 6
- Gigabyte RGB Fusion v2.0 Support ?
- Detection problem with Logitech G915 TKL HOT 4
- Is iCUE SDKv4 supported? HOT 2
- Asus ROG Aura Terminal Detected, but simply labeled as "unknown" HOT 3
- Feature Request: Integration of Phillips Hue Lights HOT 6
- Device Request: BlackWidow V4 HOT 4
- Requesting support for Razer Ornata V3 HOT 3
- Device Request: Ducky one 2 RGB HOT 2
- iCUE 5 Support needed HOT 2
- Device Request: SteelSeries Aerox 5 Wireless
- Support for the Dynamic lighting devices standard HOT 2
- Corsair legacy - partial devices too wide
- Corsair Legacy, System.ArgumentException: An item with the same key has already been added. HOT 4
- Num, Caps, Scroll lock leds? HOT 2
- Feature Discussion - Device Addition and Removal HOT 3
- PID for Naga Classic
- I need fnatic mini STREAK support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rgb.net.