User avatar
some_evil
Posts: 205
Joined: Thu Dec 18, 2014 3:16 am
Location: Albury, Australia

DS18B20 not registering

Sun Mar 08, 2015 6:37 am

Hi all,I have a raspberry pi b board connected to my breadboard and I have used the commands :
Sudo modprobe w1-gpio
Sudo modprobe w1-therm

Navigated to the w1/devices directory and used ls to find my connected thermometer, but each and every time I do this there is nothing registered/showing.

I have updated the firmware and tried several different thermometers to no avail.I have run out of things to check, im hoping someone has other suggestions for me.


Thanks for your time.
Last edited by some_evil on Sun Mar 08, 2015 9:38 pm, edited 1 time in total.
PiZeroW - May 2017
Pi 3 - Oct 2016
PiZero - June 2016
Pi 2 - Jan 2016
Pi B+ - Dec 25 2014

User avatar
rpdom
Posts: 17275
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: DS18B20 not registering

Sun Mar 08, 2015 8:12 am

The Pi now uses something called "Device Tree" to manage some hardware and drivers.

You need to set an option in /boot/config.txt to enable the 1-wire bus gpio driver.

Add the line

Code: Select all

dtoverlay=w1-gpio
then reboot and your sensor will appear.

User avatar
some_evil
Posts: 205
Joined: Thu Dec 18, 2014 3:16 am
Location: Albury, Australia

Re: DS18B20 not registering

Sun Mar 08, 2015 11:12 am

Worked a treat, thanks for your help.

Do you know if each time I restart my Pi wether or not I need to retype out the modprobe commands? Or are they set now?

Thanks
PiZeroW - May 2017
Pi 3 - Oct 2016
PiZero - June 2016
Pi 2 - Jan 2016
Pi B+ - Dec 25 2014

User avatar
DougieLawson
Posts: 39302
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: DS18B20 not registering

Sun Mar 08, 2015 11:28 am

The modprobe stuff isn't needed. The kernel modules will get loaded by the device tree processing during boot.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

User avatar
some_evil
Posts: 205
Joined: Thu Dec 18, 2014 3:16 am
Location: Albury, Australia

Re: DS18B20 not registering

Sun Mar 08, 2015 9:35 pm

perfect, thanks for your help.
PiZeroW - May 2017
Pi 3 - Oct 2016
PiZero - June 2016
Pi 2 - Jan 2016
Pi B+ - Dec 25 2014

Return to “Troubleshooting”