So I need to get the CPU temp for my program, and I am using the code below.
So, to get the CPU temp I used this code:
static void Main(string[] args)
{
try
{
ManagementObjectSearcher searcher =
new ManagementObjectSearcher("root\\WMI",
"SELECT * FROM MSAcpi_ThermalZoneTemperature");
foreach (ManagementObject queryObj in searcher.Get())
{
Console.WriteLine("-----------------------------------");
Console.WriteLine("MSAcpi_ThermalZoneTemperature instance");
Console.WriteLine("-----------------------------------");
Console.WriteLine("CurrentTemperature: {0}", (queryObj["CurrentTemperature"]));
Console.WriteLine(queryObj);
Console.ReadKey();
}
}
catch (ManagementException e)
{
Console.Write(e);
Console.ReadKey();
}
}
I need to add 2732 and divide it by 10 to get the value in celsius, but I can't find the variable to divide?
Any help is appreciated.