CPU temperature measurement

28 23129
Reply 20# ckuehnel

Sry, forgot to mention that this is for Raspbian 3.1, not Raspbian 3.0
  1. cat /sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/temp1_input
  2. 23400
Copy the Code

Reply 21# actkk2000

Ok, this clarifies it. I am downloading the 3.1 now and will try later.Thanks for the hint.

Here is my python function to read both RPi and BPi temperature :
  1. import os

  2. def read_cpu_temp():
  3.         global cputemp
  5.         cmd = """cat /sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/temp1_input |awk '{printf ("%0.1f",$1/1000); }'"""
  6.         cputemp = os.popen(cmd).readline().strip()
  7.         if not cputemp:
  8.                 res = os.popen('vcgencmd measure_temp').readline()
  9.                 cputemp = res.replace("temp=","").replace("'C\n","")
  10.         print("CPU - TEMP : "+cputemp+"")
  11.         return(cputemp)

  12. read_cpu_temp()
Copy the Code

Cool idea
Thank you!

You're welcome...
I'm actually porting all my RPi sources to the BPi, and I want them to remain compatible...

Sure, I am doing the same...


Reading the value seems to work, but it is always 42.6°. Why is that?

Edited by actkk2000 at Sat Nov 8, 2014 11:36

Please see this post about reliable temperature reading, it's very good: ... 37&fromuid=1602

calvin klein outlet online
huarache shoes
christian louboutin
michael kors factory outlet
hermes outlet online
yeezy boost 350 v2
adidas yeezy
yeezy boost 350
air jordan
supreme clothing
adidas yeezy
yeezy boost
yeezy boost 350
christian louboutin
hermes birkin bag
kyrie 5
michael kors outlet handbags
adidas stan smith men
nike air max 97
curry 6 shoes
off white shoes
supreme outlet
michael kors purses
louboutin shoes
james harden shoes
reebok outlet
adidas yeezy
nike react flyknit
nike lebron 15
kyrie 4
balenciaga triple s
lacoste online shop
hermes belts
cheap nba jerseys
hermes handbags
nike react
balenciaga sneakers
nike shoes
nike air max 97
nike epic react flyknit
ferragamo sale
christian louboutin outlet
adidas ultra boost
nike air vapormax
moncler outlet
nike air vapormax
chrome hearts outlet
golden goose
supreme clothing
louboutin shoes
jordan shoes
nike air max 270
balenciaga speed
russell westbrook shoes
goyard handbags
nike air max 97
nike air max
nike shoes
curry 4
yeezy boost 350
nike hyperdunk
bape clothing
coach outlet online
goyard handbags
curry 6
nike shox for women
air max 2017
jordan 4
nike shoes
fila disruptor 2
yeezy boost 350 v2
golden goose
michael kors outlet store
michael kors outlet
michael kors outlet online
yeezy shoes
longchamp outlet
off white
longchamp handbags
kyrie shoes
hermes birkin
nike air max
cheap jordans
calvin klein outlet
curry shoes
kd 11
supreme clothing
yeezy shoes
longchamp bags
chrome hearts
fila shoes
kobe shoes
adidas nmd

You have to log in before you can reply Login | Sign Up

Points Rules