Jump to content
Corsair Community

Simple lighting


Raichuboy17

Recommended Posts

I assume that some of you are coming on here for very simple SDK stuff, or just learning programming and want a fun project for yourself. I am learning it on my own as part of a C/C++ learning tool so I will be uploading simple modifier things on here to use in conjunction with CUE.

 

Simple single color LED lighting:

 

CorsairLedColor BASE[n];

CorsairLedId KEY[n] = {/* CorsairLedIdEnum ID, example: CLK_A is key A */ }; //n = the number of keys you want to light up. Replace n with the number of keys you want to light up

for (int i = 0; i < n; i++) {

BASE.ledId = KEY;

BASE.r = 255;

BASE.g = 255; //Basic RGB values.

BASE.b = 255;

}

 

CorsairSetLedsColors(n, base); //If you want to add more colors just copy and paste this code, but make sure to change the name of BASE and KEY. They are just variable names.

 

//THIS DOES NOE SET ANY KEY YOU DO NOT LIGHT TO AN RGB VALUE OF 0, 0, 0. You will have to do that with a second one of these setting each one to 0, 0, 0 if you want them to be blank no matter what.

Link to comment
Share on other sites

  • 1 year later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...