Waterproof DS18B20 Digital temperature sensor

I bought the Waterproof DS18B20 Digital temperature sensor and the wire colors are red, yellow, and blue. I have the red as 5V, yellow to ground, and blue as my data. Using the serial monitor it displays -127. I tried changing the yellow and blue wires around. Still reads the same. Reads the same with the probe disconnected too. Im not sure what the wire color coding is and Im not sure how to get this to communicate with the probe. Can any one please help?



My sensors have yellow for data and red for supply.

Did you use a 4k7 pull up resistor on the data line?

-127 means no connection, which is definitely true if you disconnect it, and probably true if you didn't because it is connected the wrong way round. These devices can get spectacularly hot during the second adventure.

Try Arduino 1-Wire Tutorial
or One or more DS18B20 temperature sensors on Arduino- ar3ne1tt2.htm

I think the second can be useful if you are not using multiple sensors. Then note reply #1 again, and it is 4.7k in normal practice, not 2.2k. There should always be advice from the supplier about the connections. I have yellow for signal on some, blue on others.

@tomgurule, When you mention something, please give a link to it. This one ? Waterproof 1-Wire DS18B20 Compatible Digital temperature sensor : ID 381 : $9.95 : Adafruit Industries, Unique & fun DIY electronics and kits.

You may execute the following program to check that the sensor has been properly connected. This program reads the 64-bit (8-byte) ROM/Address Code of the DS18B20 sensor and shows on the Serial Monitor. To get the value of the address again, press the RESET button of UNO. The sensor’s data line connected with DPin-3, and it is also terminated to 5V via 2.2k resistor.

#define OneWireBusPin 3
OneWire ds(OneWireBusPin);  //3
byte dsAddr[8];         //to hold 64-bit ROM Codes of DS18B20 sensor

void setup()

  ds.reset();         //sensor is reset
  ds.search(dsAddr);    //collect 64-bit (8-byte) ROM/Addres code Sensor (DS1)
  Serial.print("Address of DS18B20: ");
  for (int i = 0; i < 8; i++)
    if(dsAddr[i] <16)
    Serial.print(dsAddr[i], HEX);   //show on SM

void loop()