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

DS18B20 Waterproof Digital Thermal Probe Sensor 100cm 1M Arduino Raspberry Pi
DS18B20 Waterproof Digital Thermal Probe Sensor 100cm 1M Arduino Raspberry Pi $3.27
End Date: Saturday Jul-11-2020 23:18:41 PDT
Buy It Now for only: $3.27
DS18B20 1M Length Waterproof Digital Thermal Probe Lot 1 5 or 10
DS18B20 1M Length Waterproof Digital Thermal Probe Lot 1 5 or 10 $8.95
End Date: Monday Jul-20-2020 6:39:38 PDT
Buy It Now for only: $8.95
1 3 5 Pcs 1M Waterproof DS18B20 Temperature Temp Sensor Digital Thermal Probe
1 3 5 Pcs 1M Waterproof DS18B20 Temperature Temp Sensor Digital Thermal Probe $2.77
End Date: Wednesday Jul-29-2020 1:52:36 PDT
Buy It Now for only: $2.77
5 for 15 DS18b20 Temperature Probe Waterproof Stainless Steel Arduino Pi Comp
5 for 15 DS18b20 Temperature Probe Waterproof Stainless Steel Arduino Pi Comp $7.41
End Date: Thursday Jul-16-2020 19:50:15 PDT
Buy It Now for only: $7.41
DS18B20 Liquid Waterproof Temperature Detection Sensor Module Probe for Arduino
DS18B20 Liquid Waterproof Temperature Detection Sensor Module Probe for Arduino $4.99
End Date: Thursday Jul-23-2020 7:10:58 PDT
Buy It Now for only: $4.99
2PCS Waterproof Digital Thermal Probe or Sensor DS18B20 DS18S20 Arduino Sensor
2PCS Waterproof Digital Thermal Probe or Sensor DS18B20 DS18S20 Arduino Sensor $8.67
End Date: Monday Aug-3-2020 13:19:09 PDT
Buy It Now for only: $8.67
10PCS DS18B20 Waterproof Temperature Probe 10 PCS Arduino Shield USA
10PCS DS18B20 Waterproof Temperature Probe  10 PCS Arduino Shield USA $27.25
End Date: Tuesday Jul-21-2020 19:17:50 PDT
Buy It Now for only: $27.25
Temperature Sensor 5 PACK Waterproof Digital Thermal Probe For Arduino DS18B20
Temperature Sensor 5 PACK Waterproof Digital Thermal Probe For Arduino DS18B20 $17.45
End Date: Wednesday Aug-5-2020 9:55:33 PDT
Buy It Now for only: $17.45
Waterproof DS18B20 Digital Thermal Probe Sensor Temperature Sensor UP
Waterproof DS18B20 Digital Thermal Probe Sensor Temperature Sensor UP $15.05
End Date: Tuesday Jul-7-2020 9:52:08 PDT
Buy It Now for only: $15.05
Waterproof Digital Thermal Probe or Sensor DS18B20 30V to 55V Length1M SKU
Waterproof Digital Thermal Probe or Sensor DS18B20 30V to 55V Length1M SKU $6.99
End Date: Tuesday Jul-28-2020 9:33:32 PDT
Buy It Now for only: $6.99

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