how to print 3 ds18b20 values to lcd

i have this sketch working and getting the temps and printing to the serial monitor.
i would like to get them to print to my 20x4 lcd display with each temp reading on a separate line i have figured out how to get 1 of the readings to print but cannot figure out how to get the other 2 to also print to the lcd

/* YourDuino Multiple DS18B20 Temperature Sensors on 1 wire
  Connections:
  DS18B20 Pinout (Left to Right, pins down, flat side toward you)
  - Left   = Ground
  - Center = Signal (Pin 2):  (with 3.3K to 4.7K resistor to +5 or 3.3 )
  - Right  = +5 or +3.3 V

   Questions: terry@yourduino.com 
   V1.01  01/17/2013 ...based on examples from Rik Kretzinger
   
/*-----( Import needed libraries )-----*/
// Get 1-wire Library here: http://www.pjrc.com/teensy/td_libs_OneWire.html
#include <OneWire.h>

//Get DallasTemperature Library here:  http://milesburton.com/Main_Page?title=Dallas_Temperature_Control_Library
#include <DallasTemperature.h>

/*-----( Declare Constants and Pin Numbers )-----*/
#define ONE_WIRE_BUS_PIN 2

/*-----( Declare objects )-----*/
// Setup a oneWire instance to communicate with any OneWire devices
OneWire oneWire(ONE_WIRE_BUS_PIN);

// Pass our oneWire reference to Dallas Temperature.
DallasTemperature sensors(&oneWire);

/*-----( Declare Variables )-----*/
// Assign the addresses of your 1-Wire temp sensors.
// See the tutorial on how to obtain these addresses:
// http://www.hacktronics.com/Tutorials/arduino-1-wire-address-finder.html

DeviceAddress sumpProbe = { 0x28, 0xA1,0xCD, 0xBD, 0x05, 0x00, 0x00, 0x82 }; 
DeviceAddress wcProbe = { 0x28, 0x8D, 0xC7, 0xBC, 0x05, 0x00, 0x00, 0x7B };
DeviceAddress upperTankProbe = { 0x28, 0x7F, 0xDB, 0x4B, 0x05, 0x00, 0x00, 0xCD };



void setup()   /****** SETUP: RUNS ONCE ******/
{
  // start serial port to show results
  Serial.begin(9600);
  Serial.print("Initializing Temperature Control Library Version ");
  Serial.println(DALLASTEMPLIBVERSION);
  
  // Initialize the Temperature measurement library
  sensors.begin();
  
  // set the resolution to 10 bit (Can be 9 to 12 bits .. lower is faster)
  sensors.setResolution(sumpProbe, 10);
  sensors.setResolution(wcProbe, 10);
  sensors.setResolution(upperTankProbe, 10);



}//--(end setup )---

void loop()   /****** LOOP: RUNS CONSTANTLY ******/
{
  delay(10000);
  Serial.println();
  Serial.print("Number of Devices found on bus = ");  
  Serial.println(sensors.getDeviceCount());   
  Serial.print("Getting temperatures... ");  
  Serial.println();   
  
  // Command all devices on bus to read temperature  
  sensors.requestTemperatures();  
  
  Serial.print("sumpProbe  temperature is:   ");
  printTemperature(sumpProbe);
  Serial.println();

  Serial.print("wcProbe  temperature is:   ");
  printTemperature(wcProbe);
  Serial.println();
 
  Serial.print("uperTankProbe  temperature is:   ");
  printTemperature(upperTankProbe);
  Serial.println();
   
 
  
 
   
  
}//--(end main loop )---

/*-----( Declare User-written Functions )-----*/
void printTemperature(DeviceAddress deviceAddress)
{

float tempC = sensors.getTempC(deviceAddress);

   if (tempC == -127.00) 
   {
   Serial.print("Error getting temperature  ");
   } 
   else
   {
   Serial.print("C: ");
   Serial.print(tempC);
   Serial.print(" F: ");
   Serial.print(DallasTemperature::toFahrenheit(tempC));

    lcd.setCursor(0,1);  
    lcd.print(" sumpProbe F: ");
    lcd.print(DallasTemperature::toFahrenheit(tempC));
   
   }
}// End printTemperature
//*********( THE END )***********

Which part are you having trouble with ?
If it is positioning the LCD output on the right line then consider adding a separate parameter to the function so instead of

  printTemperature(sumpProbe);

use

  printTemperature(sumpProbe, 0);

and in the function

void printTemperature( DeviceAddress deviceAddress, byte LCDrow)

and then

    lcd.setCursor(1, LCDrow);  
    lcd.print(" sumpProbe F: ");
    lcd.print(DallasTemperature::toFahrenheit(tempC));

hello all

thanks for the reply HeliBob i will try your suggestion when i get home

i am using this to get the temps of my various tanks in my saltwater aquarium system

with the code setup like i posted i get

12:10:28 08:14:14 // the time and date line 0 on lcd
sump probe F:77.45 // the temp of my sump tank line 1 on lcd

what i would like to get is

12:10:28 08:14:14 // line 0 on lcd
sump probe F: 77.45 // temp of my sump tank line 1 on lcd
wc probe F:77.45 //temp of my water change tank line 2 on lcd
uppertank probe F:77.45 // temp of my display tank line 3 on lcd

when i delete the line lcd.setCursor(0,0);
i get

12:10:28 08:14:14
77.45
F:77.45 F:77.45
F:

try to substitute your loop() function with this, which does not use your printTemperature() function

it will show you how to position your cursor on the LCD display properly.

You can then modify your function to put that all in there

void loop()   /****** LOOP: RUNS CONSTANTLY ******/
{
  delay(1000);
  Serial.println();
  Serial.print("Number of Devices found on bus = ");  
  Serial.println(sensors.getDeviceCount());   
  Serial.print("Getting temperatures... ");  
  Serial.println();   
  
  // Command all devices on bus to read temperature  
  sensors.requestTemperatures();  
  
  Serial.print("sumpProbe  temperature is:   ");
  //printTemperature(sumpProbe);
  Serial.println();
  lcd.setCursor(0,0);
  lcd.print("Sump Probe Temp:");
  lcd.print(sumpProbe,0);
  lcd.print("F");

  Serial.print("wcProbe  temperature is:   ");
  printTemperature(wcProbe);
  Serial.println();
  lcd.setCursor(0,1);
  lcd.print("wcProbe Temp:");
  lcd.print(wcProbe,0);
  lcd.print("F");
 
  Serial.print("uperTankProbe  temperature is:   ");
  printTemperature(upperTankProbe);
  Serial.println();
  lcd.setCursor(0,2);
  lcd.print("Upper Probe Temp:");
  lcd.print(upperTankProbe,0);
  lcd.print("F");
}/

My suggested solution of passing an extra parameter to the function that displays the temperatures will allow you to put each temperature on its own line of the LCD by passing the required line number to the function. You could expand the idea further by passing both the row and column if required.

An alternative approach would be to keep an row number counter in a variable and to increment it in the function each time you output a value, resetting it to its initial value once the final temperature had been printed, but this would be less flexible.

thanks for the replies i will try out your suggestions when i get home from work
james

hello all

I finally got time to work on this problem.
heliBob your suggestion worked perfectly once i figured out were to put the 3 temp probes names in so that it would show on the lcd

had to go from this   printTemperature(sumpProbe); 

to this

  Serial.print("sump  temperature is:   ");
  printTemperature(sump, 1);
  lcd.print(" Sump Tank ");
  Serial.println();

  Serial.print("water change  temperature is:   ");
  printTemperature(wc, 2);
  lcd.print(" W/C Tank ");
  Serial.println();

  Serial.print("control panel  temperature is:   ");
  printTemperature(control, 3);
  lcd.print(" Control Panel");

then had to modify these lines

  lcd.setCursor(1, LCDrow);  
    lcd.print(" sumpProbe F: ");
    lcd.print(DallasTemperature::toFahrenheit(tempC));

to this

 float tempC = sensors.getTempC(deviceAddress);
    lcd.setCursor( 0, LCDrow );
    lcd.print("F:");
    lcd.print(DallasTemperature::toFahrenheit(tempC));

now it has
21:02:35 08/14/2014
F: 72.50 Sump Tank
F: 71.60 W/C Tank
F:72.50 Control Panel

like i wanted it to show
thank you very much

bulldog your suggestion would probably work but it gave me too many errors to work out
thank you both for your suggestions and replies
James