Difference between revisions of "Reading out onboard temperature sensors"

From Take-Air Wiki
Jump to navigation Jump to search
(Created page with "The Open.OC2 board contains two onboard temperature sensors (LM75BD) on i2c buses <code>0</code> and <code>1</code>. Both sensors use i2c-address <code>0x48</code>. The first...")
 
Line 1: Line 1:
 +
{| class="wikitable"
 +
| '''Availaible in upcoming release'''
 +
|}
 +
 
The Open.OC2 board contains two onboard temperature sensors (LM75BD) on i2c buses <code>0</code> and <code>1</code>. Both sensors use i2c-address <code>0x48</code>.
 
The Open.OC2 board contains two onboard temperature sensors (LM75BD) on i2c buses <code>0</code> and <code>1</code>. Both sensors use i2c-address <code>0x48</code>.
 
The first sensor (on i2c bus <code>0</code>) is located near the ESP flash jumper (J9).
 
The first sensor (on i2c bus <code>0</code>) is located near the ESP flash jumper (J9).

Revision as of 10:17, 9 November 2021

Availaible in upcoming release

The Open.OC2 board contains two onboard temperature sensors (LM75BD) on i2c buses 0 and 1. Both sensors use i2c-address 0x48. The first sensor (on i2c bus 0) is located near the ESP flash jumper (J9). The second sensor (on i2c bus 0) is located between the connectors J15 and GPS2 on the Cube-side of the board.

The temperature sensors are implemented in the custom kernel and device tree for the board, so to read the temperatures:

$ cat /sys/bus/i2c/devices/0-0048/hwmon/hwmon1/temp1_input
$ cat /sys/bus/i2c/devices/1-0048/hwmon/hwmon2/temp1_input

To monitor the value continuously you can pre-prend the commands above with watch -d -n 0.1