Changes

Jump to: navigation, search

Physical devices mapping (BELK/BXELK)

800 bytes added, 09:46, 20 January 2021
Temperature sensors
echo "Cpu Temp: ${TEMP}"
</pre>
 
== Power consumption ==
 
Power consumption measure can be performed accessing the INA226 device connected to the I2C bus in the BoraEVB (U3). The following commands can be saved as a shell script (e.g. read_power_values) and run to collect the measurements data:
 
<pre>
root@bora:~# cat read_power_values.sh
#!/bin/sh
 
path_dev=/sys/class/hwmon/hwmon0
 
IN1=`cat $path_dev/in1_input`
IN0=`cat $path_dev/in0_input`
VOLTAGE=`awk "BEGIN {print ($IN1-$IN0)/1000}"`
CURRENT=`cat $path_dev/curr1_input`
CURRENT=`awk "BEGIN {print ($CURRENT)/1000}"`
POWER=`cat $path_dev/power1_input`
POWER=`awk "BEGIN {print ($POWER)/1000000}"`
echo "Voltage: ${VOLTAGE}, Current: ${CURRENT}, Power:${POWER}"
</pre>
 
<pre>
root@bora:~# ./read_power_values.sh
Voltage: 3.308, Current: 0.64, Power:2.175
root@bora:~#
</pre>
8,154
edits

Navigation menu