DS18B20 Waterproof temp sensor

I've been working with this guy for a couple hours now and haven't had any luck...
It is a DS18B20 waterproof temp sensor that I got off ebay. I have a 5 pack, so I've cycled through them with no difference, so I hope the whole batch isn't bad.
Below is the latest code I have tried. I'm not sure where else to go...

/* Basic 2xDS18B20 code for serial monitor, bluetooth, Excel or w.h.y.
Derived from Hacktronics. USE THEIR ADDRESS SNIFFER and substitute your 
numbers. Use Hacktronics connections diagram. 

http://www.hacktronics.com/Tutorials/arduino-1-wire-tutorial.html

Stay away from using parasite power
-127C means bad connection
85 means you haven't gotten a read yet, probably just the 
wrong order of commands
*/

#include <OneWire.h>
#include <DallasTemperature.h>

// Data wire is plugged into pin 3 on the Arduino
#define ONE_WIRE_BUS 3

// Setup a oneWire instance to communicate with any OneWire devices
OneWire oneWire(ONE_WIRE_BUS);

// Pass our oneWire reference to Dallas Temperature.
DallasTemperature sensors(&oneWire);
  
byte Thermo1[8] = {0x28, 0x39, 0xFD, 0x50, 0x04, 0x00, 0x00, 0X69};
byte Thermo2[8] = {0x28, 0x09, 0xA9, 0xC0, 0x03, 0x00, 0x00, 0x95};
float tempC,Temp1,Temp2;  

void setup(){
  Serial.begin(9600);
  sensors.begin();
  delay(500);//Wait for newly restarted system to stabilize
  sensors.setResolution(Thermo1, 12); 
  sensors.setResolution(Thermo2, 12);
}

void loop() {
 sensors.requestTemperatures();  // call readings from the addresses
  Temp1 = sensorValue(Thermo1);
  Temp2 = sensorValue(Thermo2);  

Serial.print("      Temp1 = ");
Serial.print(Temp1);
Serial.print("      Temp2 = "); 
Serial.println(Temp2);
delay(1000);
}

//sensorValue function
float sensorValue (byte deviceAddress[])
{
  tempC = sensors.getTempC (deviceAddress);
  return tempC;
}

You haven't wired the data pin correctly. The Hacktronics page shows how to wire it. The data pin from the DS18B20 is wired directly to pin 3 on the UNO. The 4.7k resistor is wired between pin 3 and +5V.

Pete

BTW. Are those addresses for Thermo1 and Thermo2 correct? If not, you'll have to change the code so that it gets the temperature by index, or figure out the address of your sensor and put that in the sketch.

When you've fixed the data pin and pullup resistor connections, what output do you get from the code?

Pete

el_supremo:
BTW. Are those addresses for Thermo1 and Thermo2 correct?

No, they are not. The code you are using is mine, and you are using my addresses. I now realise the preamble might be a little more clear, but it should be clear of you read the tutorial. You need to get the addresses off your own sensors, using the Hacktronics sniffer as described in the tutorial, which is at the link provided. Your sensors are probably OK, they can take a fair bit of abuse.

My code is just a minor variation on that provided in the tutorial. I did this because I thought it was more suited for expansion into a larger project.