Raspberry Pi onboard temperature sensors

From Wiki
Revision as of 07:31, 28 September 2012 by Stocksy (Talk | contribs) (Created page with "The Raspberry Pi does have an I2C bus on board, but it transpires that this is for connecting sensors to the GPIO headers. The Broadcom SoC has its own sensors, which can be rea…")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The Raspberry Pi does have an I2C bus on board, but it transpires that this is for connecting sensors to the GPIO headers. The Broadcom SoC has its own sensors, which can be read using the utilities in /opt/vc.

# /opt/vc/bin/vcgencmd commands
commands="vcos, ap_output_control, ap_output_post_processing, pm_set_policy, pm_get_status, pm_show_stats, pm_start_logging, pm_stop_logging, version, commands, set_vll_dir, led_control, set_backlight, set_logging, get_lcd_info, set_bus_arbiter_mode, cache_flush, otp_dump, codec_enabled, measure_clock, measure_volts, measure_temp, hdmi_ntsc_freqs, render_bar, disk_notify, inuse_notify, sus_suspend, sus_status, sus_is_enabled, sus_stop_test_thread, egl_platform_switch, vctest_memmap, vctest_start, vctest_stop, vctest_set, vctest_get"

measure_temp is what we're after:

#/opt/vc/bin/vcgencmd measure_temp
temp=45.5'C

Anything less than 80ºC is OK. I run my RPi in a case without much ventillation and it never gets anywhere near this value.