0

I am having trouble getting to run my temperature sensor. If I execute the following script to check if the PIN 7 gives me an output, it returns 1 (as it ought to).

import re, os, urllib2
import RPi.GPIO as GPIO

if __name__ == '__main__':
    GPIO.setwarnings(True)
    GPIO.setmode(GPIO.BOARD)
    GPIO.setup(7, GPIO.IN)

    print GPIO.input(7)
    GPIO.cleanup()

Furthermore I am VERY sure, that the setup of my temperature sensor is correct, you can see an image of it here:

As it goes into the GPIO ports, the wires are arranged like this:

For all of this I was using a Rasperry Pi 3 Model B V1.2. My kernel Version is 4.4.50-v7+ As Operating System I am using Raspbian 8 (jessie)

Could it be a hardware, or a software error? I also changed up all the files as you see it in various tutorials (see comments) but still it doesn't show up in the w1/devices folder. Please help me, I have no idea what I could have done wrong. If you need further information feel free to ask.

10
  • I used this tutorial: golem.de/news/… Aug 6, 2017 at 12:20
  • I watched the video on the tutorial website you mentioned. Something is missing on the video of your reference tutorial(Since I don't know German I watched the video). The following link will be helpful for you to configure DS18B20. pimylifeup.com/raspberry-pi-temperature-sensor . Also adafruit lesson written by Dr. Simon Monk is also very helpful for your project(following link). drive.google.com/file/d/0B5HkM_BeqkJxSi13aExqT1AwZVU/…
    – Arun K S
    Aug 7, 2017 at 14:38
  • thank you very much! Hope these links help. You can also watch another tutorial if you want, I'm sure they just copied it from an english source Aug 7, 2017 at 14:43
  • I think problem is with configuration of your 1-wire protocol which is not mentioned in the tutorial you referred. To know more about 1-wire protocol configuration for ds18b20 read pinout.xyz/pinout/1_wire this one too.
    – Arun K S
    Aug 7, 2017 at 14:50
  • Oh yeah I will! After a little debugging I'll tell you wether or not it helped😉 Aug 7, 2017 at 14:57

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.