maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Python, reading internal temperature? (https://talk.maemo.org/showthread.php?t=23857)

Munk 2008-09-25 03:42

Python, reading internal temperature?
 
Hi,

Is there a way to read the internal temperature through Python?

If not, is there a way to run the internal-temp program from Nitapps.com and capture its output?

Thanks in advance.

Khertan 2008-09-25 04:23

Re: Python, reading internal temperature?
 
import commands
devs = commands.getoutput("/usr/bin/internal-temp")
print "Temp : " + devs

Munk 2008-09-25 05:38

Re: Python, reading internal temperature?
 
Kherton THANKS!

MAN! That was quick, I Love this community on internettablettalk.

It works like you said, and works great.

Thanks again. :)

codeMonkey 2008-09-25 06:10

Re: Python, reading internal temperature?
 
Internal-temp reads the temperature from /sys/devices/platform/i2c_omap.1/i2c-1/1-0048/temp1_input - might be worth doing the same thing yourself so you don't have to depend on internal-temp.


All times are GMT. The time now is 15:22.

vBulletin® Version 3.8.8