Help LCD clear

hi
i have arduino uno and an lcd sparkfun 128x64serial.
and i dont know how to clear the screen.
the code until now is:

void setup()
{
Serial.begin(115200);
Serial.print("test 1 ");
delay (1000);
Serial.print("test 2 ");
delay (1000);
Serial.print("test 3 ");

}

void loop()
{
}

and now , i want to clear the screen , but i dont know . if u guys can help vry tanks.

lcd.clear();

You probably forgot the brackets...

You have to send an escape code (0x7C) followed by a clear screen command (0x00).
Serial.print(0x7C,BYTE);
Serial.print(0x00,BYTE);

You could use lcd.clearLCD(); if you are using the library provided by sparkfun.

Don

and how can i use the library provided by sparkfun?
i rly dont know , if u guys can send me the complete code , i m very grateful.
tks

Download the library and put it with all the other libraries. The library folder is under the IDE folder e,g, Arduino-1.0.1\libraries. There should be some examples included in the library folder.

Nick_Pyner:
Download the library and put it with all the other libraries. The library folder is under the IDE folder e,g, Arduino-1.0.1\libraries. There should be some examples included in the library folder.

While that technique, a carryover from older Arduino implementations, will work, you will be better off using the currently recommended procedure which is explained here --> http://arduino.cc/en/Guide/Libraries <-- .

Why will you be better off? Because if you do it this way you don't have to remember to reinstall the library if you upgrade to a newer Arduino release.

Don

floresta:

Nick_Pyner:
Download the library and put it with all the other libraries. The library folder is under the IDE folder e,g, Arduino-1.0.1\libraries. There should be some examples included in the library folder.

While that technique, a carryover from older Arduino implementations, will work, you will be better off using the currently recommended procedure which is explained here --> http://arduino.cc/en/Guide/Libraries <-- .

Why will you be better off? Because if you do it this way you don't have to remember to reinstall the library if you upgrade to a newer Arduino release.

Don

I think that Limor's "tutorial" is awful with respect to locating where to create the "libraries" subdirectory
which is used to hold the library files.
It doesn't not really explain how it works, even using language like "it will likely be called" (how non committal....)
so it kind of expects a blind/mindless following.
Rather than offering all these different paths and ways that are specific to each OS,
a better way to locate the EXACT location for the libraries that works for all OS's the same way
is to simply bring up the IDE then click on: [File]->[Preferences]
The path to where the IDE looks will be in the text box called: "Sketchbook location".
You can continue to use the location as is, or change it if you would prefer it to be somewhere else.

Where ever your "Sketchbook location" is, create the "libraries" subdirectory.

--- bill

... simply bring up the IDE then click on: [File]->[Preferences] ...

Interesting ...

I did that and I found that for my 64-bit Windows 7 installation it pointed to: C:\Users\Don\Documents\Arduino

When I got there I found that the 'libraries' folder was already present. Inside the libraries folder I found readme.txt and the contents of that file said "For information on installing libraries, see: http://arduino.cc/en/Guide/Libraries".

Now that looks awfully familiar....

Note that depending on your (Microsoft) operating system version the Documents folder may be called My Documents.

Anyway - my recommendation still stands, this is just a different way of finding out that it is no longer recommended to put your 'extra' libraries in the same location as those supplied with the IDE.

Don

floresta:

... simply bring up the IDE then click on: [File]->[Preferences] ...

Interesting ...

I did that and I found that for my 64-bit Windows 7 installation it pointed to: C:\Users\Don\Documents\Arduino

When I got there I found that the 'libraries' folder was already present. Inside the libraries folder I found readme.txt and the contents of that file said "For information on installing libraries, see: http://arduino.cc/en/Guide/Libraries".

Now that looks awfully familiar....

Note that depending on your (Microsoft) operating system version the Documents folder may be called My Documents.

Anyway - my recommendation still stands, this is just a different way of finding out that it is no longer recommended to put your 'extra' libraries in the same location as those supplied with the IDE.

Don

I completely agree with you that for normal situations, putting your libraries under your own sketchbook directory is much better
and I highly recommend doing that as well.
There are a few situations like when wanting to develop or test with specific IDE versions where
this method can't be used, but that is by far not the norm.

With repsect to locating the users personal sketchbook directory,
I think your exercise further demonstrates why the method I described for locating the sketchbook directory
is better. It works for ALL the operating systems, including linux which is what I use.
There is no need to have describe specific directories or operating systems as Limor has done.
(She somewhat punted on the path for linux)

My rule of thumb is less is more, and so if you can come up with a simpler way to describe something
that works in the general case rather than have to describe each individual specific case, then
the simpler way is "better",
and that is why, in my view, the best method for locating the sketchbook directory
(which is where the libraries subdirectory will live)
is to have the IDE tell you where it is looking because that is what really matters
and when the IDE tell's you, it is always correct no matter which OS or OS version you are using.

BTW, the support of a separate user "libraries" under the user "sketchbook" directory
has been in the IDE for several years, and many release prior to 1.x

--- bill

Hi guys , very tanks , i made it .

now , i have another quetion :

how can erase a specific line ?

THANKS FOR EVERYTHING :smiley:

sixteen blanks

lcd.print(" ");