Reading out onboard temperature sensors

From Take-Air Wiki
Revision as of 12:17, 8 November 2021 by Joost.Weijs (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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