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

Lots Waterproof Digital Thermal Probe or Sensor DS18B20 DS18S20 Arduino Sensor
Lots Waterproof Digital Thermal Probe or Sensor DS18B20 DS18S20 Arduino Sensor $18.55
End Date: Wednesday Jul-4-2018 1:30:45 PDT
Buy It Now for only: $18.55
Waterproof Digital Thermal Probe or Sensor DS18B20 DS18B20 Arduino Sensor
Waterproof Digital Thermal Probe or Sensor DS18B20 DS18B20 Arduino Sensor $1.38
End Date: Thursday Jul-5-2018 17:04:35 PDT
Buy It Now for only: $1.38
Wholesale 5PCS Waterproof Digital Thermal Probe or Sensor DS18B20 100cm US stock
Wholesale 5PCS Waterproof Digital Thermal Probe or Sensor DS18B20 100cm US stock $9.99
End Date: Tuesday Jul-10-2018 18:48:42 PDT
Buy It Now for only: $9.99
2PCS Wholesale Newest Waterproof Digital Thermal Probe or Sensor DS18B20 100cm
2PCS Wholesale Newest Waterproof Digital Thermal Probe or Sensor DS18B20 100cm $6.89
End Date: Saturday Jul-7-2018 18:26:03 PDT
Buy It Now for only: $6.89
2PCS Waterproof Digital Thermal Probe or Sensor DS18B20 DS18S20 Arduino Sensor
2PCS Waterproof Digital Thermal Probe or Sensor DS18B20 DS18S20 Arduino Sensor $2.59
End Date: Tuesday Jul-10-2018 9:18:48 PDT
Buy It Now for only: $2.59
Wholesale New 1 20PCS Waterproof Digital Thermal Probe or Sensor DS18B20 100cm
Wholesale New 1 20PCS Waterproof Digital Thermal Probe or Sensor DS18B20 100cm $5.99
End Date: Tuesday Jun-26-2018 2:58:11 PDT
Buy It Now for only: $5.99
10pcs Waterproof DS18B20 Digital Thermal Probe Sensor Temperature Sensor 100cm
10pcs Waterproof DS18B20 Digital Thermal Probe Sensor Temperature Sensor 100cm $2.01
End Date: Thursday Jul-19-2018 18:49:59 PDT
Buy It Now for only: $2.01
1 2 5 10 PCS New 1M Length Waterproof Digital Thermal Probe or Sensor DS18B20
1 2 5 10 PCS New 1M Length Waterproof Digital Thermal Probe or Sensor DS18B20 $6.31
End Date: Saturday Jun-23-2018 6:59:21 PDT
Buy It Now for only: $6.31
1x Waterproof Digital Thermal Probe or Sensor DS18B20 Length 1M
1x Waterproof Digital Thermal Probe or Sensor DS18B20 Length 1M $1.28
End Date: Monday Jul-16-2018 8:46:44 PDT
Buy It Now for only: $1.28
1 2M DS18B20 Temperature Sensitive Module Thermometer Waterproof Cable Probe
1 2M DS18B20 Temperature Sensitive Module Thermometer Waterproof Cable Probe $1.40
End Date: Saturday Jun-30-2018 5:47:57 PDT
Buy It Now for only: $1.40

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