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

Wholesale New 10PCS Waterproof Digital Thermal Probe or Sensor DS18B20 100cm USA
Wholesale New 10PCS Waterproof Digital Thermal Probe or Sensor DS18B20 100cm USA $16.99
End Date: Wednesday May-3-2017 23:13:46 PDT
Buy It Now for only: $16.99
Wholesale 5PCS Waterproof Digital Thermal Probe or Sensor DS18B20 100cm US stock
Wholesale 5PCS Waterproof Digital Thermal Probe or Sensor DS18B20 100cm US stock $8.99
End Date: Tuesday May-16-2017 18:48:42 PDT
Buy It Now for only: $8.99
2pcs DS18B20 Stainless Steel Waterproof Digital Thermal Probe Sensor 100cm
2pcs DS18B20 Stainless Steel Waterproof Digital Thermal Probe Sensor 100cm $5.45
End Date: Saturday May-6-2017 10:22:04 PDT
Buy It Now for only: $5.45
Waterproof DS18B20 Temperature Temp Sensor Digital Thermal Probe for Arduino
Waterproof DS18B20 Temperature Temp Sensor Digital Thermal Probe for Arduino $4.30
End Date: Sunday May-14-2017 15:31:12 PDT
Buy It Now for only: $4.30
10K13950 DS18B20 LM35DZ Waterproof Digital Thermal Probe Waterproof Probe 1M 2M
10K13950 DS18B20 LM35DZ Waterproof Digital Thermal Probe Waterproof Probe 1M 2M $6.45
End Date: Wednesday May-24-2017 7:43:04 PDT
Buy It Now for only: $6.45
5PCS Waterproof Digital Thermal Probe DS18B20 DS18S20 Arduino Temperature Sensor
5PCS Waterproof Digital Thermal Probe DS18B20 DS18S20 Arduino Temperature Sensor $9.64
End Date: Wednesday May-24-2017 1:12:04 PDT
Buy It Now for only: $9.64
5PCS Waterproof Digital Thermal Probe or Sensor DS18B20 DS18S20 Arduino Sensor
5PCS Waterproof Digital Thermal Probe or Sensor DS18B20 DS18S20 Arduino Sensor $6.99
End Date: Saturday May-6-2017 19:58:48 PDT
Buy It Now for only: $6.99
2x DS18B20 Digital Temperature Sensor Thermal Probe For Thermometer Waterproof
2x DS18B20 Digital Temperature Sensor Thermal Probe For Thermometer Waterproof $6.23
End Date: Saturday May-20-2017 18:00:58 PDT
Buy It Now for only: $6.23
10PCS Waterproof Digital Thermal Probe or Sensor DS18B20 DS18S20 Arduino Sensor
10PCS Waterproof Digital Thermal Probe or Sensor DS18B20 DS18S20 Arduino Sensor $12.75
End Date: Saturday May-6-2017 20:04:06 PDT
Buy It Now for only: $12.75
2PCS Wholesale Newest Waterproof Digital Thermal Probe or Sensor DS18B20 100cm
2PCS Wholesale Newest Waterproof Digital Thermal Probe or Sensor DS18B20 100cm $6.49
End Date: Saturday May-13-2017 18:26:03 PDT
Buy It Now for only: $6.49

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