My first post here, so forgive me if this is previously asked/answered.

I'm trying to get a temperature reading from a DS18S20 temp sensor, and I'm getting stuck somewhere, but I don't have enough information to know what I'm doing.

First of all, I'm not sure I understand how to wire the sensor correctly. I'm trying to use the powered mode, because I can't for the life of me figure out how the parasite mode is supposed to be wired. But if I'm doing powered mode, is this right?

sensor pin 3: 5v, through 4.7K resistor (the other end of which goes between pin 2 and the data wire out to arduino? This part makes no sense to me)sensor pin 2: the other end of the 4.7k resistor, then to the data wiresensor pin 3: Ground

// This sketch looks for 1-wire devices and// prints their addresses (serial number) to// the UART, in a format that is useful in Arduino sketches// Tutorial: // http://www.hacktronics.com/Tutorials/arduino-1-wire-address-finder.html

Also, as you see from the diagram, you can have multiple sensors all on the same input pin.

For each sensor, you need to run the first sample code to get each sensors unique address (with only 1 sensor connected), and add it to the second sample code so your code knows which data coming into the input pin is for which sensor.

Thanks a million, DaveO! Everything worked like a charm, though I did have to tweak one small thing to get the code to work to detect the sensor address.

Where you put:

if (addr < 16) {

and:

Serial.print(addr, HEX);

I think in both cases it needs to be addr

But I'm all set, recording temperatures all over the place (well, not all over the place - actually very consistantly. If they were all over the place that would be a different kind of error ). Thanks again!