//this code is using the sparkfun lcd, you may have to edit it for your lcd, //or just have this arduino inputting back to the computer instead of the //other one #include #define txPin 8 #define rxPin 7 char input; SoftwareSerial myLCD = SoftwareSerial(rxPin, txPin); void setup() { pinMode(txPin, OUTPUT); myLCD.begin(9600); Serial.begin(2400); backlightOn(); clearLCD(); selectLineOne(); delay(100); } void loop() { if (Serial.available() > 0) { input = Serial.read(); Serial.print(input); myLCD.print(input); delay(100); } } void selectLineOne(){ //puts the cursor at line 0 char 0. myLCD.print(0xFE, BYTE); //command flag myLCD.print(128, BYTE); //position } void selectLineTwo(){ //puts the cursor at line 0 char 0. myLCD.print(0xFE, BYTE); //command flag myLCD.print(192, BYTE); //position } void clearLCD(){ myLCD.print(0xFE, BYTE); //command flag myLCD.print(0x01, BYTE); //clear command. } void backlightOn(){ //turns on the backlight myLCD.print(0x7C, BYTE); //command flag for backlight stuff myLCD.print(157, BYTE); //light level. } void backlightOff(){ //turns off the backlight myLCD.print(0x7C, BYTE); //command flag for backlight stuff myLCD.print(128, BYTE); //light level for off. } void serCommand(){ //a general function to call the command flag for issuing all other commands myLCD.print(0xFE, BYTE); }