sparkfunlcd prints asc code to lcd instead of characters

[quote]
[color=#7E7E7E]/* ------------------------------------------------[/color]
[color=#7E7E7E]* SERIAL COM - HANDELING MULTIPLE BYTES inside ARDUINO - 01_simple version[/color]
[color=#7E7E7E]* by beltran berrocal[/color]
[color=#7E7E7E]*[/color]
[color=#7E7E7E]* this prog establishes a connection with the pc and waits for it to send him[/color]
[color=#7E7E7E]* a long string of characters like "hello Arduino!". [/color]
[color=#7E7E7E]* Then Arduino informs the pc that it heard the whole sentence[/color]
[color=#7E7E7E]*[/color]
[color=#7E7E7E]* this is the first step for establishing sentence long conversations between arduino and the pc.[/color]
[color=#7E7E7E]* serialRead() reads one byte at a time from the serial buffer.[/color]
[color=#7E7E7E]* so in order to print out the whole sentence at once [/color]
[color=#7E7E7E]* (it is actually still printing one byte at a time but the pc will receive it[/color]
[color=#7E7E7E]* not interupted by newLines or other printString inside you loop)[/color]
[color=#7E7E7E]* You must loop untill there are bytes in the serial buffer and [/color]
[color=#7E7E7E]* and print right away that byte you just read.[/color]
[color=#7E7E7E]* after that the loop can continue it's tasks.[/color]
[color=#7E7E7E]*[/color]
[color=#7E7E7E]* created 15 Decembre 2005;[/color]
[color=#7E7E7E]* copyleft 2005 Progetto25zero1  <http://www.progetto25zero1.com>[/color]
[color=#7E7E7E]*[/color]
[color=#7E7E7E]* --------------------------------------------------- */[/color]
 
[color=#CC6600]int[/color]  serIn; [color=#7E7E7E]//var that will hold the bytes in read from the serialBuffer[/color]

#include [color=#006699]"SparkSoftLCD.h"[/color]

  [color=#7E7E7E]// LCD transmit pin[/color]
#define LCD_TX 2

[color=#CC6600]SparkSoftLCD[/color] lcd = [color=#CC6600]SparkSoftLCD[/color](LCD_TX);
[color=#CC6600]const[/color] [color=#CC6600]int[/color] ledPin = 13; [color=#7E7E7E]// the pin that the LED is attached to[/color]
[color=#CC6600]int[/color] incomingByte;      [color=#7E7E7E]// a variable to read incoming serial data into[/color]



 
[color=#CC6600]void[/color] [color=#CC6600][b]setup[/b][/color]() {
  [color=#CC6600][b]Serial[/b][/color].[color=#CC6600]begin[/color](9600);
  
  [color=#CC6600]pinMode[/color](ledPin, [color=#006699]OUTPUT[/color]);

   [color=#7E7E7E]// setup lcd[/color]
   
 [color=#CC6600]pinMode[/color](LCD_TX, [color=#006699]OUTPUT[/color]);
 lcd.[color=#CC6600]begin[/color](9600);
 lcd.[color=#CC6600]clear[/color]();
 
   [color=#7E7E7E]// hidden cursor[/color]
 lcd.[color=#CC6600]cursor[/color](0);
 
 
 
 [color=#CC6600]delay[/color](1000);
 
}
 

 
[color=#7E7E7E]//auto go_to_the_line function[/color]
[color=#7E7E7E]//void printNewLine() {[/color]
[color=#7E7E7E]//  Serial.print(13, BYTE);[/color]
[color=#7E7E7E]//  Serial.print(10, BYTE);[/color]
[color=#7E7E7E]//}[/color]
 

[color=#CC6600]void[/color] [color=#CC6600][b]loop[/b][/color] () {
  
  [color=#7E7E7E]//simple feedback from Arduino  Serial.println("Hello World"); [/color]
  
  [color=#7E7E7E]// only if there are bytes in the serial buffer execute the following code[/color]
  [color=#CC6600]if[/color]([color=#CC6600][b]Serial[/b][/color].[color=#CC6600]available[/color]()) {  
  lcd.[color=#CC6600]clear[/color]() ; 
    [color=#7E7E7E]//inform that Arduino heard you saying something[/color]
    [color=#CC6600][b]Serial[/b][/color].[color=#CC6600]print[/color]([color=#006699]"Arduino heard you say: "[/color]);
    lcd.[color=#CC6600]print[/color]([color=#006699]"Arduino heard you say: "[/color]);
    [color=#7E7E7E]//keep reading and printing from serial untill there are bytes in the serial buffer[/color]
     [color=#CC6600]while[/color] ([color=#CC6600][b]Serial[/b][/color].[color=#CC6600]available[/color]()>0){
        serIn = [color=#CC6600][b]Serial[/b][/color].[color=#CC6600]read[/color]();	[color=#7E7E7E]//read Serial        [/color]
        [color=#CC6600][b]Serial[/b][/color].[color=#CC6600]write[/color](serIn); 	[color=#7E7E7E]//prints the character just read[/color]
         lcd.[color=#CC6600]print[/color](serIn);
     }
     
    [color=#7E7E7E]//the serial buffer is over just go to the line (or pass your favorite stop char)               [/color]
    [color=#CC6600][b]Serial[/b][/color].[color=#CC6600]println[/color]();
    
  }
  
  [color=#7E7E7E]//slows down the visualization in the terminal[/color]
  [color=#CC6600]delay[/color](1000);
}


[/quote]

when i use the above code the lcd actually prints "arduino heard you say:" but the characters i enter in the terminal it prints as asc, so if inter "ui" the lcd shows "117 105"

That's because 'serIn' is declared an 'int' and when you .print() an int you get the numeric value.

If the lcd supports .write() you can use that or you can use .print() and cast the int to a char:

lcd.print((char)serIn);

or you can declare serIn as a char:

char  serIn; //var that will hold the bytes in read from the serialBuffer

Serial.read() only returns an int so it can return -1 if the buffer is empty. Since you check Serial.available() first that will never be the case.

ty lcd.print(char (serIn));

worked perfect