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: Tuesday May-21-2019 20:27:55 PDT
Buy It Now for only: $9.98
1 10pcs 1M DS18B20 Waterproof Sensor Digital thermometer Thermal Probe Arduino
1 10pcs 1M DS18B20 Waterproof Sensor Digital thermometer Thermal Probe Arduino $17.69
End Date: Saturday Apr-27-2019 2:37:27 PDT
Buy It Now for only: $17.69
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: Monday May-6-2019 20:45:20 PDT
Buy It Now for only: $4.20
2PCS Waterproof Digital Thermal Probe or Sensor DS18B20 DS18S20 Arduino Sensor
2PCS Waterproof Digital Thermal Probe or Sensor DS18B20 DS18S20 Arduino Sensor $2.75
End Date: Monday May-6-2019 9:18:48 PDT
Buy It Now for only: $2.75
5 for 15 DS18b20 Temperature Probe Waterproof Stainless Steel Arduino Pi Comp
5 for 15 DS18b20 Temperature Probe Waterproof Stainless Steel Arduino Pi Comp $10.61
End Date: Tuesday May-7-2019 19:50:15 PDT
Buy It Now for only: $10.61
Waterproof Digital Thermal Probe or Sensor DS18B20 Length1M
Waterproof Digital Thermal Probe or Sensor DS18B20 Length1M $1.20
End Date: Saturday Apr-27-2019 19:15:51 PDT
Buy It Now for only: $1.20
DS18B20 Temperature Temp Sensor Thermal Probe Thermometer Waterproof For Arduino
DS18B20 Temperature Temp Sensor Thermal Probe Thermometer Waterproof For Arduino $1.46
End Date: Friday May-3-2019 2:00:39 PDT
Buy It Now for only: $1.46
10K13950 DS18B20 LM35DZ Waterproof Digital Thermal Probe Waterproof Probe 1M 2M
10K13950 DS18B20 LM35DZ Waterproof Digital Thermal Probe Waterproof Probe 1M 2M $2.32
End Date: Tuesday May-14-2019 6:55:50 PDT
Buy It Now for only: $2.32
DS18B20 Digital Temperature Temp Sensor Thermal Probe For Thermometer Waterproof
DS18B20 Digital Temperature Temp Sensor Thermal Probe For Thermometer Waterproof $5.15
End Date: Saturday Apr-27-2019 13:59:45 PDT
Buy It Now for only: $5.15
3X DS18B20 18B20 Waterproof Probe Thermometer Temperature Sensor Thermal TE1029
3X DS18B20 18B20 Waterproof Probe Thermometer Temperature Sensor Thermal TE1029 $7.96
End Date: Tuesday May-21-2019 18:21:04 PDT
Buy It Now for only: $7.96

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