Programming LoL Shield

I must apologize for I'm sure this is a very basic question. I'm running an Arduino Uno with IDE v1.0 and a LOL Shield v1.5 and have had all kinds of errors. After searching around I decided to drop back to IDE v0023. The software for the shield loaded properly and I was able to call up the basic test program. I compiled the program and received and error that said "'LedSign' has not been declaired" while it highlighted the line in the program "LedSign::Init();".

Will anyone offer a guess on what and where the declair line should read. Thank you in advance.

Did you install the LoLShield library into your libraries folder? And then restart the IDE after that?

Thanks Nick for answering, To prove I put the files in the correct place: In IDE I click on "File", "Examples", "LoL_Shield_v2_beta", "LoLshield" and finally into "Basic Test" I'm able to see the program.

I restarted the IDE after putting everything in "Libraries".

Nick, I tried several programs for this shield and got the same error. I'm sure I didn't do something but I can't figure what it is.

So, post some sketch that fails to compile, and the EXACT error message you are getting.

The sketch is:

/*
 Basic LoL Shield Test
 
 Writen for the LoL Shield, designed by Jimmie Rodgers:
 http://jimmieprodgers.com/kits/lolshield/
 
 This needs the Charliplexing library, which you can get at the
 LoL Shield project page: http://code.google.com/p/lolshield/
 
 Created by Jimmie Rodgers on 12/30/2009.
 Adapted from: http://www.arduino.cc/playground/Code/BitMath
 
 History:
  	December 30, 2009 - V1.0 first version written at 26C3/Berlin

  This is free software; you can redistribute it and/or
  modify it under the terms of the GNU Version 3 General Public
  License as published by the Free Software Foundation; 
  or (at your option) any later version.

  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public
  License along with this library; if not, write to the Free Software
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/

#include <avr/pgmspace.h>  //AVR library for writing to ROM
#include <Charliplexing.h> //Imports the library, which needs to be
                           //Initialized in setup.

int blinkdelay = 100;      //Sets the time each frame is shown

/*
The BitMap array is what contains the frame data. Each line is one full frame.
Since each number is 16 bits, we can easily fit all 14 LEDs per row into it.
The number is calculated by adding up all the bits, starting with lowest on
the left of each row. 18000 was chosen as the kill number, so make sure that
is at the end of the matrix, or the program will continue to read into memory.

Here PROGMEM is called, which stores the array into ROM, which leaves us
with our RAM. You cannot change the array during run-time, only when you
upload to the Arduino. You will need to pull it out of ROM, which is covered
below. If you want it to stay in RAM, just delete PROGMEM
*/
uint16_t BitMap[][9] PROGMEM = {
//Diaganal swipe across the screen
{1, 0, 0, 0, 0, 0, 0, 0, 0},
{3, 1, 0, 0, 0, 0, 0, 0, 0},
{7, 3, 1, 0, 0, 0, 0, 0, 0},
{15, 7, 3, 1, 0, 0, 0, 0, 0},
{31, 15, 7, 3, 1, 0, 0, 0, 0},
{63, 31, 15, 7, 3, 1, 0, 0, 0},
{127, 63, 31, 15, 7, 3, 1, 0, 0},
{255, 127, 63, 31, 15, 7, 3, 1, 0},
{511, 255, 127, 63, 31, 15, 7, 3, 1},
{1023, 511, 255, 127, 63, 31, 15, 7, 3},
{2047, 1023, 511, 255, 127, 63, 31, 15, 7},
{4095, 2047, 1023, 511, 255, 127, 63, 31, 15},
{8191, 4095, 2047, 1023, 511, 255, 127, 63, 31},
{16383, 8191, 4095, 2047, 1023, 511, 255, 127, 63},
{16383, 16383, 8191, 4095, 2047, 1023, 511, 255, 127},
{16383, 16383, 16383, 8191, 4095, 2047, 1023, 511, 255},
{16383, 16383, 16383, 16383, 8191, 4095, 2047, 1023, 511},
{16383, 16383, 16383, 16383, 16383, 8191, 4095, 2047, 1023},
{16383, 16383, 16383, 16383, 16383, 16383, 8191, 4095, 2047},
{16383, 16383, 16383, 16383, 16383, 16383, 16383, 8191, 4095},
{16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 8191},
{16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383},
{16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383},
{16382, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383},
{16380, 16382, 16383, 16383, 16383, 16383, 16383, 16383, 16383},
{16376, 16380, 16382, 16383, 16383, 16383, 16383, 16383, 16383},
{16368, 16376, 16380, 16382, 16383, 16383, 16383, 16383, 16383},
{16352, 16368, 16376, 16380, 16382, 16383, 16383, 16383, 16383},
{16320, 16352, 16368, 16376, 16380, 16382, 16383, 16383, 16383},
{16256, 16320, 16352, 16368, 16376, 16380, 16382, 16383, 16383},
{16128, 16256, 16320, 16352, 16368, 16376, 16380, 16382, 16383},
{15872, 16128, 16256, 16320, 16352, 16368, 16376, 16380, 16382},
{15360, 15872, 16128, 16256, 16320, 16352, 16368, 16376, 16380},
{14336, 15360, 15872, 16128, 16256, 16320, 16352, 16368, 16376},
{12288, 14336, 15360, 15872, 16128, 16256, 16320, 16352, 16368},
{8192, 12288, 14336, 15360, 15872, 16128, 16256, 16320, 16352},
{0, 8192, 12288, 14336, 15360, 15872, 16128, 16256, 16320},
{0, 0, 8192, 12288, 14336, 15360, 15872, 16128, 16256},
{0, 0, 0, 8192, 12288, 14336, 15360, 15872, 16128},
{0, 0, 0, 0, 8192, 12288, 14336, 15360, 15872},
{0, 0, 0, 0, 0, 8192, 12288, 14336, 15360},
{0, 0, 0, 0, 0, 0, 8192, 12288, 14336},
{0, 0, 0, 0, 0, 0, 0, 8192, 12288},
{0, 0, 0, 0, 0, 0, 0, 0, 8192},
{0, 0, 0, 0, 0, 0, 0, 0, 0}, 

//Horizontal swipe
{1, 1, 1, 1, 1, 1, 1, 1, 1} ,
{3, 3, 3, 3, 3, 3, 3, 3, 3},
{7, 7, 7, 7, 7, 7, 7, 7, 7},
{15, 15, 15, 15, 15, 15, 15, 15, 15},
{31, 31, 31, 31, 31, 31, 31, 31, 31},
{63, 63, 63, 63, 63, 63, 63, 63, 63},
{127, 127, 127, 127, 127, 127, 127, 127, 127},
{255, 255, 255, 255, 255, 255, 255, 255, 255},
{511, 511, 511, 511, 511, 511, 511, 511, 511},
{1023, 1023, 1023, 1023, 1023, 1023, 1023, 1023, 1023},
{2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047, 2047},
{4095, 4095, 4095, 4095, 4095, 4095, 4095, 4095, 4095},
{8191, 8191, 8191, 8191, 8191, 8191, 8191, 8191, 8191},
{16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383},
{16382, 16382, 16382, 16382, 16382, 16382, 16382, 16382, 16382},
{16380, 16380, 16380, 16380, 16380, 16380, 16380, 16380, 16380},
{16376, 16376, 16376, 16376, 16376, 16376, 16376, 16376, 16376},
{16368, 16368, 16368, 16368, 16368, 16368, 16368, 16368, 16368},
{16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352, 16352},
{16320, 16320, 16320, 16320, 16320, 16320, 16320, 16320, 16320},
{16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256, 16256},
{16128, 16128, 16128, 16128, 16128, 16128, 16128, 16128, 16128},
{15872, 15872, 15872, 15872, 15872, 15872, 15872, 15872, 15872},
{15360, 15360, 15360, 15360, 15360, 15360, 15360, 15360, 15360},
{14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336, 14336},
{12288, 12288, 12288, 12288, 12288, 12288, 12288, 12288, 12288},
{8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192},
{0, 0, 0, 0, 0, 0, 0, 0, 0}, 
{18000}
};

void setup() {
  LedSign::Init();  //Initializes the screen
}
void loop() {
  DisplayBitMap();  //Displays the bitmap
}

void DisplayBitMap()
{
  boolean run=true;    //While this is true, the screen updates
  byte frame = 0;      //Frame counter
  byte line = 0;       //Row counter
  unsigned long data;  //Temporary storage of the row data

  while(run == true) {
    for(line = 0; line < 9; line++) {

      //Here we fetch data from program memory with a pointer.
      data = pgm_read_word_near (&BitMap[frame][line]);
      
      //Kills the loop if the kill number is found
      if (data==18000){
        run=false;
      }
      
      //This is where the bit-shifting happens to pull out
      //each LED from a row. If the bit is 1, then the LED
      //is turned on, otherwise it is turned off.
      else for (byte led=0; led<14; ++led) {
        if (data & (1<<led)) {
          LedSign::Set(led, line, 1);
        }
        else {
          LedSign::Set(led, line, 0);
        }
      }

    }
    
    //Delays the next update
    delay(blinkdelay);        
    frame++;  
  }
}

And the error title reads as " ‘LedSign’ has not been declaired"
I’m sorry Paul, I’m not sure how to collect and display here the total error list.

The charliplexing.h file is in "LOLShield": C:\Users\Jim Cook\Documents\Arduino v023\arduino-0023\libraries\LoL_Shield_PCB\LoLShield

I downloaded the LolShield library, and unzipped it into a folder called LolShield in the libraries folder in my sketchbook folder. I opened the example Basic_Test. This is the "error" I got:

Binary sketch size: 3364 bytes (of a 30720 byte maximum)

There is something wrong with how you installed the LolShield library.

Thanks Paul. I'm not sure what I did wrong, but now, at least I have a direction to search. Thanks again.

In my case it is here:

/Users/nick/Documents/Arduino/libraries/LoLShield/Charliplexing.h

This is on a Mac. You seem to have one more level of directory than I do.

You can copy the errors by simply selecting then in the IDE and hitting Copy.

Nick, /Users/Jim Cook/Documents/Arduino-0023/libraries/LoLShield/LoLShield/Examples

Under the first LoLShield folder I have the second LoLShield folder and the files: License, LoLShield.brd, LoL_Shield.sch In the second LoLShield folder Under the "examples" folder I have charliplexing.cpp, charliplexing.h and others In the "examples" folder there are the files: Basic_test, charlie_heart and others

I guess you are suggesting that I have an extra LoLShield level. Boy, that gave me a headache! Tomorrow I'll try to eliminate that extra level.

Hooray!!! It works!!!

Thank you Nick and Paul. You guys got me thinking along the right direction.

It's beautiful and mesmerizing.

I'm having the same problem that you originally had and was wondering if you could explain how to fix it. That would be awesome, thanks.

Apart from the above?

No, the IDE isn't letting me load the code into the board; it keeps giving me this error response: Basic_Test.cpp:32:68: error: Charliplexing.h: No such file or directory Basic_Test.cpp: In function 'void setup()': Basic_Test.pde:-1: error: 'LedSign' has not been declared Basic_Test.cpp: In function 'void DisplayBitMap()': Basic_Test.pde:-1: error: 'LedSign' has not been declared Basic_Test.pde:-1: error: 'LedSign' has not been declared I think that i'm having the exact same problem as Jim_Cook.

Well can you answer the questions in reply #1 above?

Yes, i did however it is still refusing to upload the code to the board and it keeps giving me the same error response: C:\Users\Owner\Desktop\arduino-1.0\libraries\LoLShield\Charliplexing.cpp:31:22: error: WProgram.h: No such file or directory C:\Users\Owner\Desktop\arduino-1.0\libraries\LoLShield\Charliplexing.cpp:48: error: 'boolean' does not name a type C:\Users\Owner\Desktop\arduino-1.0\libraries\LoLShield\Charliplexing.cpp: In function 'void LedSign::Flip(bool)': C:\Users\Owner\Desktop\arduino-1.0\libraries\LoLShield\Charliplexing.cpp:185: error: 'videoFlipPage' was not declared in this scope C:\Users\Owner\Desktop\arduino-1.0\libraries\LoLShield\Charliplexing.cpp:189: error: 'delay' was not declared in this scope C:\Users\Owner\Desktop\arduino-1.0\libraries\LoLShield\Charliplexing.cpp: In function 'void __vector_9()': C:\Users\Owner\Desktop\arduino-1.0\libraries\LoLShield\Charliplexing.cpp:290: error: 'videoFlipPage' was not declared in this scope

Jim_Cook: I'm running an Arduino Uno with IDE v1.0 and a LOL Shield v1.5 and have had all kinds of errors. After searching around I decided to drop back to IDE v0023.

Did you try what the OP did?

C:\Users\Owner\Desktop\arduino-1.0\libraries\LoLShield\Charliplexing.cpp:31:22: error: WProgram.h: No such file or directory

This message means that the library has not been updated to work with 1.0. Either update it, or use 0023 or earlier.

Alright, I will install the 0023 version ant re-try with that. I really appreciate the help.