Serial LCD Error Problem

Hello, I'm new here and I hope this is the right place to post this.

I'm using this code I found to try and use my 16x2 serial LCD I bought off of Sparkfun:

#include <SparkSoftLCD.h>

  // LCD transmit pin
#define LCD_TX 2

SparkSoftLCD lcd = SparkSoftLCD(LCD_TX);

void setup() {

   // setup lcd
  
 pinMode(LCD_TX, OUTPUT);
 lcd.begin(9600);
 lcd.clear();

   // hidden cursor
 lcd.cursor(0);

 show_setup();

 delay(1000);

}

void loop() {

    lcd.clear();
    
      // block-style blinking cursor
    lcd.cursor(2);
    
    lcd.print("Arming");
    delay(1500);
    
    lcd.clear();
    
      // hidden cursor
    lcd.cursor(0);
    
    lcd.print("16");
    lcd.cursorTo(2,1);
    lcd.print("---------------*");
    
    delay(1000);
    
    for( byte i = 15; i >= 1; i-- ) {
        
        lcd.scroll(false);
        
        // as we scroll left, we need to move our cursor to
        // the right to continue to show our countdown
        //
        // in this way, we achieve the sense that a fuse is getting
        // shorter...
        lcd.cursorTo(1,1 + (16 - i) );
        lcd.print(i, DEC);
        
        delay(1000);
     }
    
      // make last bit disappear
    lcd.scroll(false);
    delay(500);
    lcd.clear();
    lcd.cursorTo(2, 10);
    lcd.print("(boom)");
    
    delay(2000);
    
}



void show_setup() {
  
 lcd.print("I am setting up!");

   // send cursor to 2nd row, first column
 lcd.cursorTo(2,1);

 delay(500);

 for (byte i = 0; i <= 15; i++ ) {
     delay(150);
       // scroll display to the right
     lcd.scroll(true);
 }

 delay(1500);
 lcd.print("One more moment");


 for (byte i = 0; i <= 15; i++ ) {
     delay(150);
       // scroll back to the left, revealing our new text
     lcd.scroll(false);
 }

}

I keep getting the error: "SparkSoft LCD Does not name a type."

Any advice? Thank you!

Helghast-Engineer:
Hello, I'm new here and I hope this is the right place to post this.

I'm using this code I found to try and use my 16x2 serial LCD I bought off of Sparkfun:

#include <SparkSoftLCD.h>

// LCD transmit pin
#define LCD_TX 2

SparkSoftLCD lcd = SparkSoftLCD(LCD_TX);

void setup() {

// setup lcd
 
pinMode(LCD_TX, OUTPUT);
lcd.begin(9600);
lcd.clear();

// hidden cursor
lcd.cursor(0);

show_setup();

delay(1000);

}

void loop() {

lcd.clear();
   
      // block-style blinking cursor
    lcd.cursor(2);
   
    lcd.print("Arming");
    delay(1500);
   
    lcd.clear();
   
      // hidden cursor
    lcd.cursor(0);
   
    lcd.print("16");
    lcd.cursorTo(2,1);
    lcd.print("---------------*");
   
    delay(1000);
   
    for( byte i = 15; i >= 1; i-- ) {
       
        lcd.scroll(false);
       
        // as we scroll left, we need to move our cursor to
        // the right to continue to show our countdown
        //
        // in this way, we achieve the sense that a fuse is getting
        // shorter...
        lcd.cursorTo(1,1 + (16 - i) );
        lcd.print(i, DEC);
       
        delay(1000);
     }
   
      // make last bit disappear
    lcd.scroll(false);
    delay(500);
    lcd.clear();
    lcd.cursorTo(2, 10);
    lcd.print("(boom)");
   
    delay(2000);
   
}

void show_setup() {
 
lcd.print("I am setting up!");

// send cursor to 2nd row, first column
lcd.cursorTo(2,1);

delay(500);

for (byte i = 0; i <= 15; i++ ) {
     delay(150);
       // scroll display to the right
     lcd.scroll(true);
}

delay(1500);
lcd.print("One more moment");

for (byte i = 0; i <= 15; i++ ) {
     delay(150);
       // scroll back to the left, revealing our new text
     lcd.scroll(false);
}

}





I keep getting the error: "SparkSoft LCD Does not name a type." 


Any advice? Thank you!

I believe your problem is with

SparkSoftLCD lcd = SparkSoftLCD(LCD_TX);

You should probably do it this way:

SparkSoftLCD lcd(LCD_TX);

or use the new operator after the equals sign assuming the arduino programming environment supports new. I am not sure. If it is standard C++ or even Java then it should.

Comes up with the same error. Thank you for trying to help though!

Any other thoughts?

Were there any more error messages? How did you install the sparkfun library?

I simply downloaded it and copy/pasted the file in libraries.

Is this not correct?

Typically if there is a library called sparksoftlcd, you will create a sparksoftlcd folder under sketchbooks\libraries and copy the three files (.h, .cpp, and .txt, sometimes missing .txt is fine) in the folder. No nested folders such as sketchbooks\libraries\sparksoftlcd\sparksoftlcd\ or copying to arduino's system library folder. So which libraries folder did you copy the files into and did you create sub folders?