Temperature Sensor not giving proper values
The -127 for your temperature reading is actually the error code for DEVICE_DISCONNECTED_C.
In the library's example code, they put an if that checks for this error code before printing the temperature:
if(tempC != DEVICE_DISCONNECTED_C) 
{
  Serial.print(&quot;Temperature for the device 1 (index 0) is: &quot;);
  Serial.println(tempC);
} 

Since your sensor has only 2 wires, according to Wikipedia, you need a capacitor to power the sensor:

One distinctive feature of the bus is the possibility of using only two wires — data and ground. To accomplish this, 1-Wire devices include an 800 pF capacitor to store charge and power the device during periods when the data line is active.

This should hopefully resolve your issues.