i try to use the 1-wire temperature sensor DS18B20 exactly as in the tutorial. Calling the example from GitHub causes this:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/seeed_ds18b20.py", line 21, in __init__
self.device_folder = glob.glob(self.base_dir + '28*')[0]
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "examples/BasicRead.py", line 14, in <module>
main()
File "examples/BasicRead.py", line 5, in main
DS18B20 = seeed_ds18b20.grove_ds18b20()
File "/usr/local/lib/python3.7/dist-packages/seeed_ds18b20.py", line 31, in __init__
raise OSError (None, meg)
OSError: [Errno None]
#############################################################################
Please use 'sudo sh -c "echo dtoverlay=w1-gpio,gpiopin=5 >> /boot/config.txt"' then reboot to enable the w1
#############################################################################
I did enable 1-wire via raspi-config, so boot/config.txt contains:
[all]
dtoverlay=w1-gpio
If i do a ls on /sys/bus/w1/devices/, i get:
00-18000000000000-98000000000000-e80000000000w1_bus_master1
So, there is no sensor, right?
dmesg shows:
[ 59.601604] w1_master_driver w1_bus_master1: Attaching one wire slave 00.800000000000 crc 8c
[ 59.609201] w1_master_driver w1_bus_master1: Family 0 for 00.800000000000.8c is not registered.
I am on Raspberry Pi 3 Model B Rev 1.2. Can you give me a hand?
No problem, but i really didnât thought youâre still on it. Just wanted to solve it for people who google it, like i did. But knowing i helped you solve this problem a year later, makes creating an account especially for this even more worthy. I have to thank you for becoming a member of such a great movement.
I get the same messsage as the initiator of this thread (fluffygtx), but the solution provided by
entering âsudo sh -c âecho dtoverlay=w1-gpio,gpiopin=5 >> /boot/config.txtââ in a ssh session
enabling the W1 port via raspi-config
and then reboot to enable the w1
didnât solve my issue, still the same issue when I run the code in python on my raspberry.