Serial Print to LCD

Trying to get my serial monitor output (tempature readings) to show up on my LCD (2x16) but not having any luck.
I think my problem may lie with the way I have my serial outputs.

Serial.print(“Celcius: “);
float temperature = (voltage - .5) * 100;
Serial.print(temperature);
Serial.println(” degrees.”);
delay(1000);

If you can toss me a life raft that would be amazing. Here is my code. (very early stages)
Thanks

~Wayne

#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

//°C x 9/5 + 32 = °F

const int sensorPin = A0; //Sensor constant
const int degreePin = 8; // the number of the degreebutton pin
int switchState = 0;
const int printPin = 9; // the number of the print pin
int Print = 0;

void setup()
{
Serial.begin(9600); // open a serial connection to display values
pinMode(degreePin, INPUT); //initialize the degreePin button as an input
pinMode(printPin, INPUT); //initialize the degreePin button as an input
lcd.begin(16, 2);

}
void loop(){
int sensorVal = analogRead(sensorPin); // read the value on AnalogIn pin 0 and store it in a variable
float voltage = (sensorVal/1024.0) * 5.0; // convert the ADC reading to voltage
switchState = digitalRead(degreePin);
Print = digitalRead(printPin);

if(Print == HIGH)
{
if(switchState == HIGH)
{
Serial.print(“Fahrenheit: “);
float Ftemperature = (((voltage - .5) * 100) * 1.8 + 32);
Serial.print(Ftemperature);
Serial.println(” degrees.”);
delay(1000);
}
else
{
Serial.print(“Celcius: “);
float temperature = (voltage - .5) * 100;
Serial.print(temperature);
Serial.println(” degrees.”);
delay(1000);
}
}

if (Serial.available()) {
// wait a bit for the entire message to arrive
delay(100);
// clear the screen
lcd.clear();
// read all the available characters
while (Serial.available() > 0) {
// display each character to the LCD
lcd.write(Serial.read());
}
}
}

I believe by virtue of your code

lcd.write(Serial.read());

you imply that the LCD is a serial device, it isn't but there are LCDs that are. The standard code is set cursor, followed by lcd.print

setup
lcd.setCursor(10,0);
lcd.print( "degF");  

loop..........


 if(switchState == HIGH)
    {
      Serial.print("Fahrenheit: ");
      float Ftemperature = (((voltage - .5) * 100) * 1.8 + 32);
      Serial.print(Ftemperature);
      Serial.println(" degrees.");
lcd.setCursor(0,0);
lcd.print (Ftemperature);

      delay(1000);

I'll try this when I get home from school today, Thanks ^ _ ^

Nick_Pyner: I believe by virtue of your code

lcd.write(Serial.read());

you imply that the LCD is a serial device, it isn't but there are LCDs that are. The standard code is set cursor, followed by lcd.print

. . .

Isn't this the same syntax as used in the example code in the LiquidCrystal - Serial Input tutorial? http://arduino.cc/en/Tutorial/LiquidCrystalSerial

Don

Trying to get my serial monitor output (tempature readings) to show up on my LCD (2x16) but not having any luck. I think my problem may lie with the way I have my serial outputs.

Are you simply trying to get the temperature data to show up in two different displays (Serial monitor; lcd); or as a learning exercise, are you attempting the more complex task of trying to get the Serial monitor to echo back to the Arduino and lcd what data it has previously received from the Arduino?

In the first case, follow Nick's suggestion of just passing your data into lcd.print. If you really are attempting to echo the monitor, get back to us.

Thanks Nick! Had to edit it a little bit but in the end it worked wonders.
Cattledog ~ Was trying to echo the monitor but this is more or lesa what I wanted so it worked out in the end.