timofurrer / w1thermsensor

A Python package and CLI tool to work with w1 temperature sensors like DS1822, DS18S20 & DS18B20 on the Raspberry Pi, Beagle Bone and other devices.
MIT License
493 stars 113 forks source link

RPi, which input to use? #18

Closed WattsC-90 closed 7 years ago

WattsC-90 commented 8 years ago

Hi, me again! Just trying to familiarise myself with this library, but getting no sensor found error, which input should the sensor be connected to on an rpi zero? Is there any way to change that pin? Thanks

timofurrer commented 8 years ago

Unfortunately, I don't have any experiences with the pi zero. However, this python package is not responsible for detected the sensors from the connected pins. This is what the w1-gpio kernel module is for. It basically detects the sensors and creates some files which are then read by this python package.

What's the output of ls -lR /sys/bus/w1/devices?

WattsC-90 commented 8 years ago

Hi Timo, thanks for getting back to me. I was trying to establish which pin you used to connect into etc. on the RPi. There is conflicting information on the net. The output of the ls command varies, showing the 1w-bus-master and 00-2000 etc, 00-4 etc. I did realise that, after asking originally, I hadnt enabled the w1-gpio module in the pi, just trying to establish the hardware connections to figure out whats going on.

timofurrer commented 7 years ago

did realise that, after asking originally, I hadnt enabled the w1-gpio module in the pi, just trying to establish the hardware connections to figure out whats going on.

Any news on this one?

petonic commented 7 years ago

On the RPI0 or any, really, it uses GPIO 4 (Pin 7). Same as RPI3.

Thanks, Timo, for writing this and making it available to the community. It's a really solid, simple, package 👍

timofurrer commented 7 years ago

On the RPI0 or any, really, it uses GPIO 4 (Pin 7). Same as RPI3.

Thanks for the input!

Thanks, Timo, for writing this and making it available to the community. It's a really solid, simple, package :+1:

And thanks for the feedback! I appreciate it!

@WattsC-90 I assume you solved the problem by enabling the kernel module?

bsimmo commented 7 years ago

That's not quite right. GPIO is the default pin used, but you can change it in /boot/config.sys file with a dtoverlay=w1-gpio settings You can use raspi-config to enable it at it's default setting and it places it there for you You should not need to do anything after that and everything runs as it should, no modprobes are needed as the overlay does it for you.

marcosadsj commented 7 years ago

@bsimmo I tryied all options, as change /boot/config.sys and others tutorials, but only worked it change in the raspi-config, through your comment! THANKS!

timofurrer commented 7 years ago

This question seems to be answered, thus I'm going to close this.

I might create a little FAQ and link to this issue since it seems to be important.

Thanks :tada: