ParallaxLCD master

When I attempt to verify ParallaxLCD master I get the following error messages before I do any thing to alter the text;

LCD_2x16:12:‘ParallaxLCD’ does not name a type
LCD_2x16:ino:In function ‘void setup()’:
LCD_2x16:30:error:'lcd’was not declared in this scope
LCD_2x16:ino:In function ‘void loop()’:
LCD_2x16:110:error:'lcd’was not declared in this scope

This is the sketch as copied;

/*
NOTE: you must: #include <SoftwareSerial.h>
BEFORE including the ParallaxLCD.h header
*/

#include <SoftwareSerial.h>
#include <ParallaxLCD.h>

#define ROWS 2
#define COLS 16

ParallaxLCD lcd(2,2,16); // desired pin, rows, cols

/**

  • Initialize the 2-dimensional custom character byte array.
  • Even though each ‘byte’ is 0-255, only the lowest 5 bytes are used. So only
  • 0-31 are valid values.
    */
    byte customCharacters[8][8] = {0, 4, 14, 31, 14, 4, 0, 0, // Diamond
    0, 10, 14, 31, 31, 14, 4, 0, // Heart
    0, 4, 14, 31, 14, 4, 14, 0, // Spade
    4, 14, 4, 10, 31, 10, 4, 14, // Club (sorta…)
    4, 14, 21, 4, 4, 4, 4, 4, // Up
    4, 4, 4, 4, 4, 21, 14, 4, // Down
    27, 22, 13, 27, 22, 13, 27, 22, // Stipple pattern #1
    29, 14, 23, 27, 29, 14, 23, 27 // Stipple pattern #2
    };
    void setup () {

lcd.setup();
delay(1000);
lcd.backLightOn();
lcd.at(1,4,“Milliseconds\0”);
delay(1000);
lcd.off();
delay(1000);
lcd.on();
lcd.pos(0,1);
lcd.at(0,1,“m:\0”);
for (int b=0; b<101; b+=5) {
lcd.at(0,3,millis());
delay(500);
}
lcd.empty();
lcd.print(“Line Feed\0”);
for (int b=0; b<51; b+=5) {
lcd.lf();
delay(500);
}
lcd.empty();
lcd.print(“Chr Return\0”);
delay(1000);
for (int b=0; b<51; b+=5) {
lcd.pos(0,11);
delay(500);
lcd.cr();
delay(500);
}

lcd.cursorBlock();
lcd.empty();
lcd.print(“Block Cursor\0”);
for (int x=1; x<16; x++) {
lcd.pos(1,x);
delay(500);
}
lcd.empty();
lcd.print(“Underline Cursor\0”);
lcd.cursorUnderline();
for (int x=1; x<16; x++) {

lcd.pos(1,x);
delay(500);
}
lcd.backLightOff();
lcd.cursorOff();

// Clear the screen and enjoy a brief interlude.
lcd.empty();
lcd.print(“Music Maestro!\0”);
lcd.playTone(213, 216, 223);
lcd.playTone(213, 216, 223);
lcd.playTone(214, 216, 227);
lcd.playTone(210, 217, 220);
lcd.playTone(210, 217, 222);
lcd.playTone(210, 217, 224);
lcd.playTone(210, 217, 226);
delay(3000);

/**

  • Initialize the custom character slots on the LCD with the predefined values.
    /
    int i;
    for(i=0; i < 8; i++) {
    lcd.setCustomCharacter(i, customCharacters
    );*
  • }*
  • lcd.empty();*
  • lcd.backLightOn();*
  • // Now display them for 2 seconds each.*
  • for(i=0; i < 8; i++) {*
  • lcd.at((i%ROWS),1, “Custom Char \0”);*
  • lcd.at((i%ROWS),13, i);*
  • lcd.printCustomCharacter(i);*
  • lcd.cr();*
  • delay(2000);*
  • }*
    }
    void loop () {
  • lcd.at(2,9,millis());*
    }
    [/quote]
    Is there a place to look up error messages and what they mean? I’m trying to use a parallax 2x16 lcd with the attached 3 pin serial adapter and Arduino Uno.
    Thanks,
    Rich

The first error indicates that something is wrong at line 12: LCD_2x16:12:'ParallaxLCD' does not name a type The compiler does not know what 'ParallaxLCD' is. That means it can not find the library. How did you install the library ?

  • use the code button (the '#' button) instead of quotes to post code

  • it appears all your errors stem from failing to define the lcd object in line 12. Are you sure the library is installed correctly?

I think I figured out my problem from your comments. The code was downloaded correctly but needed to be renamed and added to the sketch . ie it was in my libraries folder but I did not add it to the sketch library properly. Please forgive my ignorance on this issue and on how to copy code. Thanks, Rich

That is okay. Many users have a problem installing a library. It is a common problem. That is why Sleepydoc an me pointed in that direction.

Arduino is able to install the *.zip file, to make it easier. http://arduino.cc/en/Guide/Libraries