LOL Shield

Post here to let others know of a project you're working on.

Moderators: Chuckt, Garth, bitfogav

Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Chuckt
I practically live here!
I practically live here!
Posts: 1127
Joined: Sun Mar 28, 2010 1:36 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

LOL Shield

Post by Chuckt » Sun Feb 10, 2013 3:52 pm

I built my LOL Shield. It took more than one sitting. I tried the way the build instructions said and after doing it a while, I did it my way. The LOL Shield represents the difficulty of soldering something upside down and there are a lot of LEDs that you have to get in line or your work will show. I did the LEDs one at a time and after a while, I would solder one pin, turn the board around and then reheat the pin and straighten the LED. If I had to do this for production, the LOL Shield would cost a lot more than what I bought it for and to make every LED straight would take a long time. When it came time to put the pin headers in the Arduino, I didn't put them in all the way because there wouldn't be clearance for the board because the barrel jack sits up too high. At some point I will have to play and test it but it is all finished.
LOL Shield 001.jpg
LOL Shield 001.jpg (184.36 KiB) Viewed 28734 times
I had a little difficulty with the board. My solder started traveling up the iron instead of down the iron so I changed my solder tip. Solder had previously dripped into two of the vias so I put the board in my panavise, heated one end and forced an LED through the other end which worked. The board came with six extra LEDs so if I heated an LED too long, I can possibly replace them. I started this build with this board on top of a plastic CD case and even though I didn't touch the case, the case has a melt mark on it because there is a lot of heat coming off the iron. I will probably use this CD case (not shown here) as a safety example of the unknown dangers of soldering.

I will have to test it when I have more time and it is time for me to move on to other projects.
LOL Shield 002.jpg
LOL Shield 002.jpg (199.58 KiB) Viewed 28734 times

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: LOL Shield

Post by brad » Thu Feb 14, 2013 9:54 pm

Well done Chuck and thanks for keeping us informed on the progress!

Chuckt
I practically live here!
I practically live here!
Posts: 1127
Joined: Sun Mar 28, 2010 1:36 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: LOL Shield

Post by Chuckt » Fri Mar 01, 2013 2:58 pm

My 9 volt battery to DC barrel jack cables came in the mail today and then I found the cable that was missing and I found another project that was missing. I had to use my hard drive A to B USB cable because that is the only cable I have for the Arduino.

Tonight I downloaded the Arduino software and I installed the drivers. I downloaded the code for the LOL shield. I spent some time because the instructions were written for people who already know what they are doing and I'm just a beginner who hasn't done this before. After being stuck on about two steps, I finally got it to work.

My lol shield works. I think I have two LEDs that don't light up so I may reheat the solder joints and replace them. I had tested them with a coin cell battery per your advice before doing any work and they worked before assembly. The non-working LEDs are the third one on the bottom left from the left and the second one on the top right from the right.

I now have a piece of new hardware to show off.

I think it is time to start thinking about playing my Gameduino :)

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: LOL Shield

Post by brad » Fri Mar 01, 2013 7:01 pm

Great to hear that it had fired up for you Chuck!

Any chance of some photos or perhaps a video to see the LOLShield in action?

Chuckt
I practically live here!
I practically live here!
Posts: 1127
Joined: Sun Mar 28, 2010 1:36 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: LOL Shield

Post by Chuckt » Sun Mar 03, 2013 3:11 am

This is my photo of the LOL shield in operation without me using a flash:
Lol Shield in Operation 003.JPG
Lol Shield in Operation 003.JPG (226.21 KiB) Viewed 28677 times
I had one of those eye opening moments once the microcontroller worked but not quite like this one:



If anyone watching has thought about getting involved, it is easy, someone here can help you get started and we would like to see you post your projects. Don't wait as long as I had getting started.

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: LOL Shield

Post by brad » Sun Mar 03, 2013 1:36 pm

The cast away reference made me laugh!

I guess we all have a little celebration when we make something work :)

Great to see that yours is a success. Any plans for the LOL shield, maybe a game perhaps?

Chuckt
I practically live here!
I practically live here!
Posts: 1127
Joined: Sun Mar 28, 2010 1:36 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: LOL Shield

Post by Chuckt » Mon Mar 04, 2013 2:30 pm

brad wrote:Great to see that yours is a success. Any plans for the LOL shield, maybe a game perhaps?
I only bought Arduino for the tutorials so that I could use it and have a point of reference to learn hardware but then came along the Gameduino and the Maple (microcontroller) to complicate things. I only got interested in electronics because of the computer aspect of it but I thought about adding microcontrollers for a future science fair. I looked into building the Lyra ( http://www.lira.cc/ ) for a low cost Arduino clone but I'm basically looking at spending $10 just to get BatchPCB into just setting up the boards in order to get low cost boards but that would require other people's involvement for me to break even. I found a part list here which can be ordered from Digikey or Mouser : http://www.ladyada.net/make/boarduino/dc-parts.html

It might possible to make a game for the LOL shield. They have all the pins mapped out on the program file so I would have to come up with a formula to use the charlieplexing. I believe there is enough memory to use a random number and a sine like command to move the lit LEDs back and forth. I would have to add inputs for human movement.

Right now, I don't have the time to learn the library structure and C for Arduino and Arduino is not high on my list even though I built the BoArduino to make the 3D LED cube.

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: LOL Shield

Post by brad » Wed Mar 06, 2013 8:57 pm

Doesn't it already have the code to draw data to the LED's? I imagine it would just have an array that you could fill with data and it would keep outputting this data to the display.

Chuckt
I practically live here!
I practically live here!
Posts: 1127
Joined: Sun Mar 28, 2010 1:36 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: LOL Shield

Post by Chuckt » Wed Mar 06, 2013 11:54 pm

I don't think it is that simple.

Code: Select all

/*
 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++;  
  }
}

User avatar
Saimaster13
I practically live here!
I practically live here!
Posts: 176
Joined: Mon Aug 13, 2012 4:23 am
Location: Sarasota, Florida
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: LOL Shield

Post by Saimaster13 » Thu Mar 07, 2013 8:07 am

That looks overly complicated and that specific code eems to have limited uses. If you wanted, I could probably write a simple code for displaying pictures or data. That is what I did for a Lights Out game I am working on. However, I would need to know what pins of the Arduino are controlling what on the matrix, and what Arduino is being used.
Joshua

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: LOL Shield

Post by brad » Fri Mar 08, 2013 8:56 am

Chuckt wrote:I don't think it is that simple.
Ah but it is that simple!

Here are your key lines of code:

Code: Select all

#include <Charliplexing.h> //Imports the library, which needs to be initialized in setup.
This include file takes care of displaying the data on the screen. It says you need to initialise the screen, so you had better add this:

Code: Select all

void setup() {
  LedSign::Init();  //Initializes the screen
}
Then all you need to do is give an X / Y co-ordinate for the LED you want to turn on. you could if you want, do something as simple as this to turn on one specific LED:

Code: Select all

LedSign::Set(0, 0, 1);
With the above code, it will turn on LED 0, in Line 0 (the 1 means turn it on), this following code will ensure it is off:

Code: Select all

LedSign::Set(0, 0, 0);
Or maybe turn on an LED right near the middle of the screen (since it is a 14 LED by 10 line screen)

Code: Select all

LedSign::Set(7, 4, 1);
So in order to draw a picture, you would have an array of 1's and 0's. You would then run two for loops (just like they have done in the code you posted) the outer loop will increment through the lines while the inner loop will increment through the LED's on each line, so you then line up your screen x,y co-odinates with your array of 1's and 0's to draw the picture.

Does that make sense?

Chuckt
I practically live here!
I practically live here!
Posts: 1127
Joined: Sun Mar 28, 2010 1:36 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: LOL Shield

Post by Chuckt » Sun Mar 10, 2013 10:02 am

Saimaster13 wrote:That looks overly complicated and that specific code eems to have limited uses. If you wanted, I could probably write a simple code for displaying pictures or data. That is what I did for a Lights Out game I am working on. However, I would need to know what pins of the Arduino are controlling what on the matrix, and what Arduino is being used.
The LOL shield uses all of the pins on the Arduino Uno; at least I soldered all the pin headers to the connections listed even though I'm sure 3.3v isn't used because I'm using 9 volts and I believe the board has a 5 Volt regulator:

0 through 13, GND, AREF
Reset, 3.3v, 5V, GND, GND, VIN
A0 through A5

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: LOL Shield

Post by brad » Sun Mar 10, 2013 8:26 pm

I'm very interested to see if this simple example works for you Chuck.

replace this code:

Code: Select all

void loop() {
  DisplayBitMap();  //Displays the bitmap
}
with this:

Code: Select all

void loop() {
  LedSign::Set(0, 0, 1);    // should light up just one single LED
}

Chuckt
I practically live here!
I practically live here!
Posts: 1127
Joined: Sun Mar 28, 2010 1:36 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: LOL Shield

Post by Chuckt » Fri Mar 29, 2013 9:40 pm

brad wrote:I'm very interested to see if this simple example works for you Chuck.

replace this code:

Code: Select all

void loop() {
  DisplayBitMap();  //Displays the bitmap
}
with this:

Code: Select all

void loop() {
  LedSign::Set(0, 0, 1);    // should light up just one single LED
}
I may try it if I get the time and chance to play with it.
I would have to put the LOL shield on an Arduino Mega to make a game because I would need more pins since the LOL shield takes up all of the pins of an Arduino Uno. I have read that the LOL Shield didn't initially work on the Arduino Mega so I wonder if they have that fixed or whether I would have to fix it.

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: LOL Shield

Post by brad » Sat Mar 30, 2013 8:08 pm

Okay, but be sure to let me know how you go :)

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Who is online

Users browsing this forum: No registered users and 8 guests