CPU temperature measurement

28 16083
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

lebron 14
cartier bracelet
john wall shoes
adidas store
adidas yeezy boost
kobe 11
basketball shoes
cheap jordans
adidas nmd runner
yeezy shoes
nhl jerseys
adidas tubular
jordan 13
moncler jackets
roshe shoes
christian louboutin
adidas ultra boost uncaged
air jordan
adidas yeezy
cheap basketball shoes
lebron 14 shoes
patriots jersey
air max
nike running shoes
dior sunglasses
yeezy boost 350
adidas ultra boost
prada sunglasses
vapor max
fenty puma
adidas yeezy
Kanye West shoes
basketball shoes
air force 1
kobe sneakers
real jordans for sale cheap
prada glasses
cheap jordans
adidas pure boost
adidas zx flux
adidas ultra boost
paul george shoes
retro jordans
pandora charms
adidas superstar
cheap jordans
vibram five fingers
ultra boost
true religion outlet
chrome hearts online
hogan outlet online
air max 90
lebron james shoes
converse outlet
adidas superstar shoes
yeezy boost
light up shoes
nike huarache
cheap jordans
kobe basketball shoes
100% real jordans for cheap
golden goose
adidas online shop
reebok shoes
van cleef
links of london outlet store
vans shoes
michael kors handbags
air yeezy
yeezy boost
golden goose sneakers
moncler jackets
golden goose sneakers
nike huarache
adidas outlet
pure boost
yeezy boost 350 v2
birkin bag
led shoes
yeezy boost 350
off white clothing
michael kors outlet
michael kors outlet online
derrick rose shoes
james harden shoes
jordan shoes
led shoes for kids
lebron soldier 10
vibram fivefingers
yeezy boost
timberland boots
nike dunk shoes
hermes birkin
nike air huarache
adidas eqt
balenciaga sneakers
jordan 6
jordan shoes
kyrie shoes
gucci belts
air jordans
yeezy boost 350 v2
nike air huarache

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

Points Rules