DS18S20 temperature sensor , reading problem.

I use that sensor and it has 3 wires. You need a 4.7k resistor between vcc and signal for it to work as well. Plus taking a look at the code will help.