New library added need help adding it to arduino programmer.

So i saw that a new library was added from sparkfun to the Arduino website here (Arduino Playground - SerLCD) how do I add to arduino if the files are in .cpp and .h form?

Assuming Windows. Create a new folder called SerLCD in the libraries folder that is in the folder where your programs are stored and put the .h and .cpp files in it. Stop and start the IDE and the library should be available.

Thank you for the reply.
I did that and now the library shows up under sketch -> import library. So in order to start using the functions the library has I just have to include it in the top and my code and call a function like this?
serLCD::clearLine(X) where x is a number

or just


both are saying undeclared function

I would expect that you will need to create an instance of the SerLCD object.
Are there any examples with the library ? Post your whole program here.

There were no examples with the library just the .h and .cpp file. Here is an example code I have that I want to test out the commands in

#include <SoftwareSerial.h>

SoftwareSerial mySerial(3,2); // pin 2 = TX, pin 3 = RX (unused)

void setup()
mySerial.begin(9600); // set up serial port for 9600 baud
//delay(100); // wait for display to boot up

//puts the cursor at line 0 char 0. line 1
mySerial.write(0xFE); //command flag
mySerial.write(128); //position
mySerial.print(" BOOTING UP ā€œ);
//puts the cursor at line 0 char 0. line 2
mySerial.write(0xFE); //command flag
mySerial.write(192); //position
mySerial.print(ā€ PLEASE WAIT ");

void loop()
mySerial.write(254); // move cursor to beginning of first line

//this function prints a simple counter that counts to 10
for(int i = 10; i >= 0; iā€“)
mySerial.print(" This is a test counter ");
mySerial.print(i, DEC);



Before going any further it would be interesting to know what device you are trying to drive using this library. Can you please provide a link to it ?

16X2 Serial LCD from sparkfun (SparkFun Serial Enabled 16x2 LCD - Amber on Black 3.3V - LCD-09069 - SparkFun Electronics)

Have you tried looking in the actual .cpp and .h files? There may well be instructions in there on how to use it in the comments.

Have a look at this page Arduino Playground - SerLCD

If you follow the link on it to the SerLCD() function you will find an example that should get you started.

That's the page where i got the library from. The examples they have is the same two files .h and .cpp from the library. The files don't compile in arduino. when I try to include the library in my sketch and call the functions they have it gives me the error "has no member named setcursor."
I wish they would give an example code that has all the functions being called once in a demo.

That's because it's setCursor, not setcursor. C++ is case sensitive!

I copy pasted the function from the ccp file to make sure i didn't spell it wrong. I just wrote it wrong when i typed it into the forum. Has anyone else been able to use this library in arduino?