Overview
Temperature is one of the most fundamental drivers of ecological processes. It governs ectotherm activity, plant growth rates, invertebrate development, and decomposition. In microhabitat studies, even small thermal gradients — between sun and shade, canopy and ground, water and air — can explain species distributions.
sensor-w1therm reads 1-Wire temperature sensors via the Linux kernel w1_therm driver. The 1-Wire bus allows multiple probes to share a single GPIO pin, making it ideal for deploying several temperature sensors at different heights, depths, or orientations from a single monitoring node.
Supported Sensors
- DS18B20 — the most common waterproof temperature probe (family code 0x28)
- DS18S20 — original 1-Wire thermometer (family code 0x10)
- DS1822 — economy alternative (family code 0x22)
- DS1825 — addressable variant (family code 0x3B)
- DS28EA00 — with sequence-detect for chain topology (family code 0x42)
Installation
Enable the 1-Wire interface and install:
sudo sensor-w1therm enable # adds w1-gpio overlay, reboot required
# Or build from source:
make
sudo make installUsage
sensor-w1therm # read all connected probes
sensor-w1therm internal # internal sensors only
sensor-w1therm external # external sensors only
sensor-w1therm setup # configure for fast reading
sensor-w1therm list # list supported measurementsExample Output
[
{"sensor":"ds18b20","measures":"temperature","unit":"Celsius","sensor_id":"28-0123456789ab","value":23.500}
]Ecological Applications
- Vertical temperature profiling in forest canopy studies
- Soil temperature monitoring for invertebrate and seed bank research
- Water temperature logging in streams and ponds for aquatic species monitoring
- Nesting box thermal monitoring for cavity-nesting bird studies
- Spatial thermal gradient mapping across microhabitats