DS18B20 Temperature Sensors

Through extensive searching I've figured out how to connect up some DS18B20 sensors to my Duemilanove, the first is powered in normal mode and the others are in parasite mode (I currently only have 3 hooked up, hoping more won't be a problem).

Anyways, my issue is that I want to put the sensors in specific locations and I want to get the temperature from each and run the data through KST. Each time I power up the Duemilanove the sensors seem to report in different orders with getTempCByIndex(x). I have figured out how to get the addresses from each sensor (e.g. 28-E9-E6-AF-02-00-00-9B). How do I collect data from the sensors by address so that I can keep the correct order? Thank you in advance.

I've changed them all to normal mode power because I couldn't see more than 3 with the parasite mode.

Also I'm using the OneWire and DallasTemperature libraries.

Does anyone know where there's an API for the DallasTemperature library? I'm not sure in what format to pass an address to requestTemperaturesByAddress or if that's even what I need.

Uh, the DallasTemperature library IS an API!

A 1-wire device address is defined in the DallasTemperature.h file as:
typedef uint8_t DeviceAddress[8];
Simply an array of eight unsigned bytes.

The "parasitic" mode was a clever idea, and probably valuable in some circumstances.

In general, though, I avoid it... it is just "one more thing to go worng", and easily, in most cases, avoided.

More on this at...

An API tends to give more detail about the methods. I’ve never seen the unit8_t type so I didn’t know what that was.

Sometimes, my friend, you may have to search through the system include or header files to find your answers instead of documentation telling you everything. This comes from 3+ decades of experience.

The address order from library should not deviate since the search
algorithm can create a given list of 1-wire devices in only one order.
Mind you, a loose or dirty wire could cause some problems.

Also, if brims is using parasitic power for part of his buss, I hope that
a "strong" pullup is used there. DalSemi recommends using another
I/O pin to turn on a FET connected between Vdd and the data line to be
sure enough current is delivered during temperature conversion.
I tried something similar to brims on my breadboard and usually had
problems if I used only the 4k7 resistor as a pullup on the data line.

My recommendation is to supply the +5v down the buss to all devices.