Not much luck for me today. I used the very simple code below and it wont even detect my sensors if they are both connected. No problem one at a time though.
I've wired my sensors exactly like this:
#include <OneWire.h>
#include <DallasTemperature.h>
// Data wire is plugged into pin 10 on the Arduino
#define ONE_WIRE_BUS 10
// Setup a oneWire instance to communicate with any OneWire devices
// (not just Maxim/Dallas temperature ICs)
OneWire oneWire(ONE_WIRE_BUS);
// Pass our oneWire reference to Dallas Temperature.
DallasTemperature sensors(&oneWire);
DeviceAddress tmp_address;
int numberOfDevices;
void setup(void)
{
// start serial port
Serial.begin(9600);
Serial.println("Looking for sensors...");
// Start up the library
sensors.begin();
delay(6000);
numberOfDevices = sensors.getDeviceCount();
Serial.print("Found ");
Serial.print(numberOfDevices);
Serial.println(" sensors. Starting now...");
}
void loop(void)
{
// call sensors.requestTemperatures() to issue a global temperature
// request to all devices on the bus
sensors.requestTemperatures(); // Send the command to get temperatures
for(int i=0;i<numberOfDevices; i++)
{
Serial.print(i);
Serial.print(":");
Serial.println(sensors.getTempCByIndex(i));
delay(100);
}
Serial.println();
delay(1000);
}