DS18B20 1-Wire Temperature Probe

DS18B20 1-Wire Temperature SensorNeeds 4.7K resistor

I have 10 waterproof cabled versions .  I have also blown up one cabled versions although I'm not sure how.

Resources - http://learn.adafruit.com/adafruits-raspberry-pi-lesson-11-ds18b20-temperature-sensing

My code

##################################################################

def read_temp_raw(device_file):
f = open(device_file, 'r')
lines = f.readlines()
f.close()
return lines

def read_temp(device_file):
lines = read_temp_raw(device_file)
while lines[0].strip()[-3:] != 'YES':
time.sleep(0.2)
lines = read_temp_raw(device_file)
equals_pos = lines[1].find('t=')
if equals_pos != -1:
temp_string = lines[1][equals_pos+2:]
temp_c = float(temp_string) / 1000.0
return temp_c

def pdstemprature(TempDevice):
if debug:
print ("Reading temp "+ str(TempDevice))
base_dir = '/sys/bus/w1/devices/'
device_folder = base_dir + TempDevice
device_file = device_folder + '/w1_slave'
if(os.path.exists(device_file)):
if debug:
print ("Reading temp exists "+ str(TempDevice))
Temperature = read_temp(device_file)
else:
Temperature = 0
return Temperature

####################################################################

Probe serial numbers

28-000003e6cf37 - Outside
28-000003ebb63d - bedroom 2
28-000003ebb9fd - bedroom
28-000003ebbbc1 - livingroom
28-00000474a26b - on Pi box outside
28-000004759c3e - inside Pi box
28-000004f9d576 - hallway
28-000004f8af5e - Bottom of window

10pcs Waterproof DS18B20 Digital Thermal Probe SensorTemperature Sensor 100cm TS
10pcs Waterproof DS18B20 Digital Thermal Probe SensorTemperature Sensor 100cm TS $2.76
End Date: Thursday Dec-27-2018 16:28:07 PST
Buy It Now for only: $2.76
Waterproof Ds18B20 Digital Thermal Probe Sensor Temperature Sensor100CmSYS
Waterproof Ds18B20 Digital Thermal Probe Sensor Temperature Sensor100CmSYS $5.41
End Date: Thursday Jan-3-2019 8:15:08 PST
Buy It Now for only: $5.41
3X DS18B20 18B20 Waterproof Probe Thermometer Temperature Sensor Thermal TE1029
3X DS18B20 18B20 Waterproof Probe Thermometer Temperature Sensor Thermal TE1029 $7.96
End Date: Monday Dec-24-2018 17:43:44 PST
Buy It Now for only: $7.96
5PCS Waterproof Temperature Probe DS18B20 1M with Heat Resistance Thermal Cable
5PCS Waterproof Temperature Probe DS18B20 1M with Heat Resistance Thermal Cable $9.75
End Date: Saturday Dec-22-2018 19:47:14 PST
Buy It Now for only: $9.75
1M 1 2 5 10 DS18B20 Waterproof Sensor Digital Probe Thermometer Thermal Arduino
1M 1 2 5 10 DS18B20 Waterproof Sensor Digital Probe Thermometer Thermal Arduino $3.99
End Date: Wednesday Dec-26-2018 4:32:02 PST
Buy It Now for only: $3.99
Waterproof Digital Thermal Probe or Sensor DS18B20 DS18B20 Arduino Sensor
Waterproof Digital Thermal Probe or Sensor DS18B20 DS18B20 Arduino Sensor $1.38
End Date: Tuesday Jan-1-2019 16:04:35 PST
Buy It Now for only: $1.38
5PCS Waterproof Digital Thermal Probe or Sensor DS18B20 DS18S20 Arduino Sensor
5PCS Waterproof Digital Thermal Probe or Sensor DS18B20 DS18S20 Arduino Sensor $6.28
End Date: Sunday Jan-6-2019 7:50:50 PST
Buy It Now for only: $6.28
Waterproof Digital Thermal Probe or Sensor DS18B20 Length1M US Stock N67
Waterproof Digital Thermal Probe or Sensor DS18B20 Length1M US Stock N67 $4.20
End Date: Sunday Jan-6-2019 19:45:20 PST
Buy It Now for only: $4.20
DS18B20 Stainless Steel Waterproof Digital Thermal Probe Sensor 100cm Arduino
DS18B20 Stainless Steel Waterproof Digital Thermal Probe Sensor 100cm Arduino $2.65
End Date: Thursday Dec-27-2018 9:22:15 PST
Buy It Now for only: $2.65
New DS18b20 Silicone Wire Temperature Probe Waterproof 18b20 Temperature prob TW
New DS18b20 Silicone Wire Temperature Probe Waterproof 18b20 Temperature prob TW $5.53
End Date: Friday Jan-4-2019 13:32:58 PST
Buy It Now for only: $5.53

« Previous12345...910

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>