-
Notifications
You must be signed in to change notification settings - Fork 1
Dallas 1 Wire Temperature Sensor
This page will help you install and use a Dallas 1-wire temperature sensor (typically a DS18B20
) with qToggleOS.
-
Connect your Dallas sensor to the Raspberry Pi board, on a GPIO of your preference (use GPIO4 if in doubt).
-
Add the following line to your
/data/etc/dtoverlays
file:w1-gpio gpiopin=4
Replace
4
with the GPIO number you use. Add multiple entries if you plan to use multiple sensors connected to the same board, on different GPIOs.For more details on dtoverlays, see this.
-
Reboot the system:
# reboot
-
Find the address of your sensor(s):
# ls -1 /sys/bus/w1/devices/*/w1_slave | grep -oE '28-[^/]+' 28-00000deadbee
-
Install the
qtoggleserver-dallastemp
add-on:# pip install qtoggleserver-dallastemp
See Installing Add-ons if you're not sure how to do this.
-
Follow the instructions from qtoggleserver-dallastemp to install and configure the add-on.
-
Restart qToggleServer:
# service qtoggleserver restart
The temperature port should show up in your qToggleServer.
-
You should see the detected devices in
/sys/bus/w1/devices
:# ls /sys/bus/w1/devices/ 28-00000deadbee w1_bus_master1
-
Make sure the modules
w1-gpio
andw1-thermo
are loaded:# lsmod | grep w1 w1_therm 16384 0 w1_gpio 16384 0 wire 40960 2 w1_therm,w1_gpio
-
Make sure your sensor is properly connected and has the needed resistor between Data and VCC pins.