1 SHT21 Driver (Relative Humidity and Temperature Sensor)
2 =======================================================
7 This is the driver for the relative humidity and temperature sensor commonly
8 found on the WeatherCape expansion board for the BeagleBone.
13 This driver implements the character device interface. It supports reading
14 through /dev/sht21b{1,3}s40. When read from, it returns a string containing
15 a data label, a colon, and the sensor value.
17 Example output of `cat /dev/sht21b3s40`:
22 Temperature is expressed in Celsius (a.k.a. centigrade). Valid values are
25 Humidity is expressed as a percentage. Valid values are 0.000 to 100.000.
30 Intense activity causes the chip to heat up, affecting the temperature reading.
31 In order to prevent the chip from self-heating more than 0.1C, the sensor
32 values will only be read once per second. Subsequent reads within the same
33 second will return cached temperature and humidity values.
35 The measurement resolution is configurable in the chip, but this driver just
36 uses the default maximum resolutions (12-bit for Humidity, 14-bit for
37 temperature). It could probably be implemented with an ioctl() or by passing
38 an argument via the minix-service command, but it doesn't seem too useful at
39 this time. See the data sheet for the trade-off between faster conversion time
42 In testing, the temperature sensor reported a value several degrees higher
43 than an indoor thermometer placed nearby. It doesn't appear to be a bug in the
44 driver as the Linux driver reports similar temperature. Additionally, the
45 BMP085 temperature sensor on the same cape reports a temperature about 2
46 degrees lower than the SHT21. This could be due to heat produced by the
47 BeagleBone heating the cape slightly or maybe just a bad chip on the test
53 The driver should have been started by a script in /etc/rc.capes/ If not,
54 this is how you start up an instance:
56 cd /dev && MAKEDEV sht21b3s40
57 /sbin/minix-service up /service/sht21 -label sht21.3.40 -dev /dev/sht21b3s40 \
58 -args 'bus=3 address=0x40'
60 Getting the sensor value:
66 /sbin/minix-service down sht21.3.40