PDA

View Full Version : Coding: CPU Temp -> Arduino



NightrainSrt4
04-25-2010, 10:22 PM
Generally use Realtemp, but if there is an easier alternative let me know.

Anyway, I can do this in a simple manor, and just not have it be real time. Have Realtemp write to the log every x seconds. Write an app to read the log, parse the data how I want it, then beam it over serial to the Arduino to display. Obviously the closer I get to the 1 second updates Realtemp does, the more disk thrashing (and worrying about file access conflicts).

Any good temp app that uses shared memory? That way I can access the data without dealing with disk thrashing and timing conflicts.

EDIT: The original post was open for almost an hour while I was searching. Figures that just after I post I find CoreTemp has shared memory. But it doesn't seem that CoreTemp has GPU temps like RealTemp?

Mach
04-25-2010, 10:25 PM
LCD Smartie is what you want.
http://www.uchobby.com/index.php/2008/02/12/arduino-analog-gauge/
http://www.diylife.com/2008/02/02/show-pc-stats-on-analog-gauges/

NightrainSrt4
04-26-2010, 10:33 AM
That would work and there is already Arduino sketches for using it, but I wanted to code this myself, as I've been slacking on my coding and I figured when I got the Arduino that it would be a good chance to get motivated again.

I know that when this section of the forum kicks off most people are going to want pre-made solutions with minimal fuss to get it going. For me, I want the fuss; I need the fuss. Otherwise, the Arduino is nothing more than another piece of hardware that will sit there because it is boring to me for it to just be essentially plug and play. I mean, I could resketch/recode the Matrix Orbital bytes to Arduino, but now that I've seen it done, and pretty much how straight forward the code was, my solution wouldn't look much different.

Sorry if this is sounding whiny or something. I should have been more clear with my intentions. My solutions may not be as simple or as elegant as some already available, but I need the process to learn.

Edit: But I do not want to have to go so far as to access registers, write/get the driver to do so, and do temp scaling/conversions myself. While perhaps not above me if I really tried and took my time, a bit overkill when another app does this well. I know, a fine line, as that reasoning could be used to just use LCDSmartie, but alas.



Anyways -
I know RealTemp allocates shared memory, and provides the dll to access it. I've just got to figure out if it can do GPU temps like Realtemp can.

Tonight I'll start coding on the simple method I mentioned above. That shouldn't take me too long, if I can devote a little time to it. Once I've got that working, most of that code will be useful for the shared memory method, it's just writing the C++ to get at the data in memory.

Any other good temp programs that have shared memory, or another way to obtain the temperatures in real-time (or near) that I have overlooked?

Oneslowz28
04-26-2010, 11:44 AM
Maybe Everest Ultimate uses shared memory. It updates temps in realtime.

Mach
04-26-2010, 12:55 PM
I understand fuss OCD and I commend you for it. Unfortunately my coding skills have also moldered away so I cannot be of much help. Please share what you come up with.

crenn
04-26-2010, 09:34 PM
You'd still have to interface between the software on your PC and the LCD module connected to the arduino.

NightrainSrt4
04-27-2010, 09:03 AM
I would have gone for it had I not already seen this solution within ~30 seconds of googling after I knew to look for lcdsmartie. (http://www.nuelectronics.com/estore/index.php?main_page=project_lcd%20smartie)

I'll inevitably end up trying it, and recoding it to suit my needs/desires, but I am starting with the first method I mentioned, then going the shared memory route, and maybe even another if someone has any ideas.

Then maybe I'll just go the lcdsmartie route, if only to compare results.

dscottboggs
09-15-2012, 04:45 PM
I'm trying to do something similar to this, but I don't want a display of the temperature, I want an aftermarket cooling system to kick in at a certain temperature, is there any way to do that do that through an arduino system?

SXRguyinMA
09-21-2012, 08:19 AM
Well there's an easy way and a hard(er) way to do this.

The easy way is to use a regular 10k thermistor and place it near the CPU (tape it to the read of the MB, stick it next to the die itself under the CPU latch, etc) and read temps that way.

The harder way it to write a python script (or something similar) to read the CPU temp from your OS then relay it via serial commands to the Arduino for control.