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

5PCS Wholesale Waterproof Digital Thermal Probe or Sensor DS18B20 100cm NS
5PCS Wholesale Waterproof Digital Thermal Probe or Sensor DS18B20 100cm NS $9.98
End Date: Thursday Jun-20-2019 20:27:55 PDT
Buy It Now for only: $9.98
10X Waterproof DS18B20 Digital Thermal Probe Sensor Temperature Sensor 100cm FU
10X Waterproof DS18B20 Digital Thermal Probe Sensor Temperature Sensor 100cm FU $5.42
End Date: Sunday Jul-14-2019 1:40:28 PDT
Buy It Now for only: $5.42
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: Thursday Jun-20-2019 20:47:14 PDT
Buy It Now for only: $9.75
10X Waterproof DS18B20 Digital Thermal Probe Sensor Temperature Sensor 100cSN
10X Waterproof DS18B20 Digital Thermal Probe Sensor Temperature Sensor 100cSN $5.21
End Date: Thursday Jul-18-2019 0:58:05 PDT
Buy It Now for only: $5.21
5PCS Waterproof Digital Thermal Probe Or Sensor DS18B20 Sensor
5PCS Waterproof Digital Thermal Probe Or Sensor DS18B20 Sensor $2.27
End Date: Monday Jul-8-2019 13:31:35 PDT
Buy It Now for only: $2.27
10Pcs 1M DS18B20 Waterproof Sensor Digital Thermometer Thermal Probe Arduino
10Pcs 1M DS18B20 Waterproof Sensor Digital Thermometer Thermal Probe Arduino $6.95
End Date: Friday Jul-12-2019 4:15:31 PDT
Buy It Now for only: $6.95
Waterproof Digital Thermal Probe or Sensor DS18B20 Length1M
Waterproof Digital Thermal Probe or Sensor DS18B20 Length1M $1.20
End Date: Wednesday Jun-26-2019 19:15:51 PDT
Buy It Now for only: $1.20
10X Waterproof DS18B20 Digital Thermal Probe Sensor Temperature Sensor 100ODUS
10X Waterproof DS18B20 Digital Thermal Probe Sensor Temperature Sensor 100ODUS $1.96
End Date: Friday Jul-5-2019 10:22:19 PDT
Buy It Now for only: $1.96
3X DS18B20 18B20 Waterproof Probe Thermometer Temperature Sensor Thermal TE1029
3X DS18B20 18B20 Waterproof Probe Thermometer Temperature Sensor Thermal TE1029 $8.36
End Date: Thursday Jun-20-2019 12:28:09 PDT
Buy It Now for only: $8.36
DS18B20 Temperature Temp Sensor Thermal Probe Thermometer Waterproof For Arduino
DS18B20 Temperature Temp Sensor Thermal Probe Thermometer Waterproof For Arduino $1.46
End Date: Tuesday Jul-2-2019 2:00:39 PDT
Buy It Now for only: $1.46

« 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>