BBB - Debian 10.3 - SHT21 sensor not detected (I2C)

As stated in the question, i2cdetect isn’t able to detect the SHT21 sensor on the BBB, although plenty of posts online claim that it works fine with a Raspberry PI.
Therefore, you can ignore it and use the sht21 kernel module anyway.

The circuit remains the one shared before.
Here’s what you need to do in a nutshell:

# gain root privileges, or use `sudo` each time you're asked
sudu su

# verify that the sht21 kernel module exists
find "/lib/modules/$(uname -r)/kernel/drivers/hwmon" -name sht21.ko.xz

# load the module
modprobe sht21

# let the kernel know to which bus the sensor is connected
echo sht21 0x40 > /sys/bus/i2c/devices/i2c-2/new_device

# the sensor values should now be exposed at /sys/class/hwmon/hwmon0 (or hwmon<some other number>)
cd /sys/class/hwmon/hwmon0

# print the temperature reading
cat temp1_input

# print the humidity reading
cat humidity1_input

Meanwhile, if somebody knows why i2cdetect doesn’t work with this particular sensor on the BBB, feel free to share!

1 Like