Skip to content

Dallas 1 Wire Temperature Sensor

Calin Crisan edited this page Dec 27, 2019 · 16 revisions

Instructions

  1. Connect your Dallas sensor to the Raspberry Pi board, on a GPIO of your preferenc (use GPIO4 if in doubt).

  2. 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 dtoverlsys, see this.

  3. Follow the instructions from qtoggleserver-dallastemp to install and add support for Dallas temperature sensors to your qToggleServer.

  4. Reboot.

Troubleshooting

  • You should see the detected devices in /sys/bus/w1/devices:

      # ls /sys/bus/w1/devices/
      28-00000b247706 w1_bus_master1
    
  • Make sure the modules w1-gpio and w1-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.

Clone this wiki locally