DS18S20 does nothing

I get no real response from my temperature sensor when using the examples from playground and DallasTemperature.h

Hooked up the sensor on the bread board: 5V power going across the 4.7K resistor to pin2 of DS18S20. Have pin 8 of arduino also going to pin pin 2 of sensor. The ground goes to pin 1 on sensor. The resistor is dropping 2.5V. Not sure how I could have screwed that up but very possible.

Tried first with the DallasTemperature lib but basically found no devices and value always returned -127

Dallas Temperature IC Control Library Demo Locating devices...Found 0 devices. Parasite power is: OFF Requesting temperatures...DONE Temperature for the device 1 (index 0) is: -127

Then tried the OneWire.h example on playground and found that ds.Search() would return False and that was as far as it got.

Don't know how to even troubleshoot this issue at this point. Any help would be greatly appreciated.


Connect pin 3 to +5v as well. Are you sure you have identified the pins on the device correctly? With the flat facing you and the legs pointing down, pin 1 is on the left hand side. Have you changed the software to reflect the fact you have the data line connected to pin 2 ?

Thanks Grumpy,

Just after posting I flipped the sensor around even though I new I had it correct. Of course it started working perfectly after that