I don't know if it's going to be helpful but I think that milesburton means kiss-of-death, and at least this is an alternative that compiles kosher and forms the basis for my stuff.
// This Arduino sketch reads DS18B20 "1-Wire" digital
// temperature sensors.
// Copyright (c) 2010 Mark McComb, hacktronics LLC
// License: http://www.opensource.org/licenses/mit-license.php (Go crazy)
// Tutorial:
// http://www.hacktronics.com/Tutorials/arduino-1-wire-tutorial.html
// code uses Arduino LCD stuff, for shield on Freetronics EtherTen.
// Serial print commands are for PLX-DAQ
// Research your own pins!
#include <OneWire.h>
#include <DallasTemperature.h>
#include <LiquidCrystal.h>
LiquidCrystal lcd(8,9,A2,5,6,7);
int flag;
// Data wire is on pin 3
#define ONE_WIRE_BUS 3
// Setup a oneWire instance to communicate with any OneWire devices
OneWire oneWire(ONE_WIRE_BUS);
// Pass our oneWire reference to Dallas Temperature.
DallasTemperature sensors(&oneWire);
// Assign the addresses of your 1-Wire temp sensors.
DeviceAddress InThermo = { 0x28, 0x69, 0xC2, 0xB0, 0x03, 0x00, 0x00, 0X9F };
DeviceAddress OutThermo = { 0x28, 0x7A, 0x8B, 0xC0, 0x03, 0x00, 0x00, 0x2F };
//temperature variables
float InTemp, OutTemp, diff, drain, flow, power, tempC;
void setup(void)
{
Serial.begin(9600);
Serial.println("LABEL,Time,TempIn,TempOut,diff");
lcd.begin(16, 2);
lcd.print("temp in out");
// Start up the library
sensors.begin();
sensors.setResolution(InThermo, 12);
sensors.setResolution(OutThermo, 12);
}
void loop(void)
{
delay(1000);
Serial.print("DATA,TIME, ");
flag = 0;
//Get the sensor readings. There are two of them
sensors.requestTemperatures();
GetandPrint(InThermo);
InTemp=tempC;
flag = 1;
GetandPrint(OutThermo);
diff = tempC - InTemp;
Serial.print (diff);
Serial.println(" , ");
}
void GetandPrint(DeviceAddress deviceAddress)
{
tempC = sensors.getTempC(deviceAddress);
if (tempC == -127.00) {
Serial.print("Error getting temperature");
}
else {
Serial.print(tempC);
Serial.print(" , ");
}
lcd.setCursor (1,1);
if (flag==1)
(
lcd.setCursor (11,1)
);
lcd.print (tempC);
}