Do you fancy some RGB setup to look even more cool on your PC? Here is how you can change RGB lighting based on CPU temperature on any PC.
If you are into building rather than buying a gaming PC, you may have this passion for getting fancy yet unique with technical experience. To get that immersive gaming experience, one might want RGB LED effects to make their PC look cooler and cyberpunk-ish.
But what if we tell you there is a way to change the LED color scheme on your PC based on the temperature? Imagine your PC gets overheated due to overclocking the CPU, and the LEDs turn RED or to any other color to denote the change. Similarly, when the cooler fan speed increases to cool down the PC, the LED changes to blue. Sounds cool right?
Here is your complete step-by-step guide on how to change the RGB color lighting based on CPU temperature. This method can be applied on any PC as long as you have the right ports for inserting in the LEDs.
The Setup We Are Going to Use
Here is the PC setup on which we will implement the RGB color-changing LED effect based on CPU temperature. But you can try anything equivalent to this one.
- Processor: AMD Ryzen 9 7950X
- Motherboard: ASUS TUF Gaming B550+
- Operating System: Windows 11
- LED: ARGB LED (regular LED).
- AINEX 2Way ARGB LED Strip Light 30cm RLD-STRDM30B
What Type of Software Do We Need?
Here is a list of software we will use for programming RGB lights to change color based on CPU Temperature.
MS Visual Studio IDE Software (2022)
We will use This integrated development environment software to create C# file. We will paste a code in the C# file to let the LEDs understand how to behave against certain temperature levels.
The LibreHardwareMonitorLib library will be used to acquire hardware information, which we will be using for obtaining the CPU temperature.
If you want software that can control the LEDs from a single panel, you must install OpenRGB. This standalone application for controlling LED functioning also contains a server function that clients can use for TCP/IP connections.
This library of OpenRGB.Net is your client for connecting to the OpenRGB server.
Before proceeding to the next step, ensure you have downloaded and installed all the above software.
Setup RGB Color Lighting Based on CPU Temperature
Here we have mentioned step-by-step methods you need to follow to change the RGB LED color scheme based on CPU Temperature.
- Insert the ARGB strips into the motherboard. You may find this connector as a white colored 4-pin header.
- Download and install the OpenRGB software.
- Install the LibreHardwareMonitorLib and OpenRGB.Net with the help of the NuGet package manager.
- Open the MS Visual Studio and click ‘Create a New Project.’
- Select ‘Windows Forms App’ and click ‘Next.’
- In this new C# project, paste the following code.
- Then make a class for Update Visor and then paste the following code.
- Now open the OpenRGB software and in the devices and change the Mode to ‘Direct.’
- Then, switch to the ‘SDK Server’ tab and check the ‘Start Server’ button. Now, you have to connect the server with the client application that we made.
- Now, we have to connect the OpenRGB serving with the help of OpenRGB.NET while setting the LED colors below. Here is the code you have to provide to the function.
- For setting the temperature ranges, we have written some code as well. Here we will be entering the values according to Celsius. For example, at 40 Celsius, I have set the values to indicate green color. Similarly, the LED turns RED when the temperature rises from 40 Celsius to 70 or 90 Celsius range.
- In the code mentioned above, you can see the temperature ranges for changing color are mentioned.
- Once you have made your C# function file, you have to run the function each time to change the RGB LED color according to temperature.
Changing RGB LED color based on CPU temperature can be a useful visual aid while gaming as it helps gamers understand their gaming PC’s state. The steps mentioned in this article can be applied to any computer system.
Therefore, it seems like a bit of technical geek stuff with the coding and function calling. Hopefully, the steps mentioned in this article have helped you to make your own RGB lighting setup that changes according to CPU temperature.