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 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 Apr-23-2020 20:47:14 PDT
Buy It Now for only: $9.75
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 Apr-23-2020 20:27:55 PDT
Buy It Now for only: $9.98
1pcs waterproof DS18B20 digital temperature sensor probe for Arduino 1m
1pcs waterproof DS18B20 digital temperature sensor probe for Arduino 1m $1.12
End Date: Friday Apr-24-2020 19:41:48 PDT
Buy It Now for only: $1.12
1 2 5 10 DS18B20 Waterproof Sensor Digital Thermometer Thermal Probe Arduino 1M
1 2 5 10 DS18B20 Waterproof Sensor Digital Thermometer Thermal Probe Arduino 1M $12.29
End Date: Wednesday Apr-15-2020 20:38:09 PDT
Buy It Now for only: $12.29
Waterproof Digital Thermal Probe or Sensor DS18B20 Length1M US Stock N67
Waterproof Digital Thermal Probe or Sensor DS18B20 Length1M US Stock N67 $4.30
End Date: Wednesday Apr-8-2020 20:45:20 PDT
Buy It Now for only: $4.30
SONOFF DS18B20 Waterproof Temperature Probe TH10 16 Temperature Wireless Monitor
SONOFF DS18B20 Waterproof Temperature Probe TH10 16 Temperature Wireless Monitor $3.29
End Date: Thursday Apr-16-2020 13:30:18 PDT
Buy It Now for only: $3.29
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 $1.99
End Date: Wednesday Apr-29-2020 1:52:36 PDT
Buy It Now for only: $1.99
2 x DS18B20 Waterproof Digital Thermal Probe Sensor 325 FT Arduino Raspbe
2 x DS18B20 Waterproof Digital Thermal Probe Sensor 325 FT Arduino Raspbe $5.34
End Date: Saturday Apr-11-2020 23:20:46 PDT
Buy It Now for only: $5.34
5 PACK Wholesale Waterproof Digital Thermal Probe or Sensor DS18B20 100cm FD
5 PACK Wholesale Waterproof Digital Thermal Probe or Sensor DS18B20 100cm FD $9.89
End Date: Monday Apr-6-2020 1:49:44 PDT
Buy It Now for only: $9.89
10 Waterproof Digital Thermal Probe or Sensor DS18B20 DS18S20 Arduino Sensor NS
10 Waterproof Digital Thermal Probe or Sensor DS18B20 DS18S20 Arduino Sensor NS $17.59
End Date: Saturday May-2-2020 0:06:23 PDT
Buy It Now for only: $17.59

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