Difference between revisions of "Reading out onboard temperature sensors"

From Take-Air Wiki
Jump to navigation Jump to search
 
Line 11: Line 11:
 
  $ cat /sys/bus/i2c/devices/1-0048/hwmon/hwmon2/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 <code>watch -d -n 0.1</code>
+
To monitor the value continuously you can pre-pend the commands above with <code>watch -d -n 0.1</code>

Latest revision as of 17:31, 6 March 2023

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-pend the commands above with watch -d -n 0.1