Question about LCD using Serial Communication

hi guys im a newbie user of arduino.. i have a problem on how to clear the screen of LCD since im using serial communication i didnt use the liquidcrystal.h library i saw that theres a code lcd.clear() and lcd.begin(0, 0) under that library is there a equivalent value for this code using serial or anything?

Hoi, there are libs for serial displays - which one are you using ?

i only knew begin(), end(), available() ,read() ,peek() ,flush(), print(), println(), write(), SerialEvent() i didnt use any #include, i started at void setup right away, followed by loop. is there a equivalent code to clear the screen of a LCD like lcd.clear() for serial? same as on setting up the cursor on specific place like lcd.begin(0, 0)?

Sorry, i meant: which lcd you are using (Manufacturer, Type and Controller) :slight_smile:

I am using also some strange serial lcds, and as there are no libs for that i am using some simple functions.
best is in that case, if you can reset your display by an arduino port, so then it is guaranteed that the cursor is top left.

Here is a sketch that uses 2 additional libraries (can be downloaded for free here: http://arduiniana.org/NewSoftSerial/NewSoftSerial12.zip):
This is the depending site with a brief description and samples, too: NewSoftSerial | Arduiniana

#include <NewSoftSerial.h>
#include <SerLCD.h>

/***************************************************************************** 
 * Sketch:  SerLCD_CharSet.pde
 * Author:  Andreas Kriwanek
 * Version: 1.00 02.04.2011/21:00
 *
 * Hardware:
 * Arduino UNO
 * Sparkfun serial LCD Display 16x2
 * Use Digital Pin 11 for serial interface
 *
 *
 *****************************************************************************/
// RTC values:
// NewSoftSerial Object on pin 11
NewSoftSerial softSER(0,11);
// SerLCD object using that softSER; initializing for 16x2 LCD:
SerLCD serLCD(softSER, 16, 2); 

char LCDChar[2]="";

//----------------------------------------------------------------------------------------------------------
// Setup and Main:

void setup(void)
{
  // Remember to start the NewSoftSerial port
  // before doing things with the SerLCD
  softSER.begin(9600);
  Serial.begin(9600);
  // This will attempt to initialize the display to
  // blank with the backlight on:
  serLCD.begin();
  // Display some massively important informative text
  serLCD.setPosition(1,0);
  serLCD.print("SparkFun serLCD");
  serLCD.setPosition(2,0);
  serLCD.print("<Character Set>");
  delay(1000);
}

void loop(void){
  // Some text at positions
  serLCD.clear();
  for(int i=0; i<=255; i++){
    if (i!=124 && i!=254){
      serLCD.setPosition(1,0);
      serLCD.print("Value=");
      sprintf(LCDChar, "0x%02X", i);
      serLCD.print(LCDChar);
      serLCD.setPosition(2,0);
      serLCD.print("Character:");
      serLCD.print(char(i));
      delay(2000);  
    }  
  }
}

thx sir A.R.Ty, ill try this later, need to take a rest 1st. ill update you later about this. thank you very much :)

there are libs for serial displays - which one are you using ?

Sorry, i meant: which lcd you are using (Manufacturer, Type and Controller)

These are important questions since there are several incompatible serial implementations available. Until you get the answers you will not be able to give any reliable advice.

This is the depending site with a brief description and samples, too: http://arduiniana.org/libraries/newsoftserial/

Did you read and understand the contents of the first paragraph, the one printed in red?

Don

Did you read and understand the contents of the first paragraph, the one printed in red?

Sure, did you read something about which IDE he's using ? :P

Just write the LCD with all spaces and it looks like its cleared until you switch back. Easy trick I use sometimes. :) lcd.begin is just used to initialize the LCD, if you have it working with text I don't see why you'd need it.

Sure, did you read something about which IDE he's using ?

Yes, on the first line of the original post.

Don