Pages: 1 [2] 3   Go Down
Author Topic: Simple emoticon display. LoL shield help.  (Read 3087 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I will actually create my own matrix but probably based on the LOL, just the LEDs will be mounted in a clear piece of plastic much like what was done here, just a different shape.

Still wondering though is it going to be possible to switch from one emoticon to another without using multiple buttons?  Just press something and cycle to the next.
« Last Edit: November 06, 2012, 10:45:18 pm by PropDad » Logged

Offline Offline
Sr. Member
****
Karma: 6
Posts: 429
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

For one button, count the button presses, then use switch case (or if then) to select each function.
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 201
Posts: 8701
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Still wondering though is it going to be possible to switch from one emoticon to another without using multiple buttons?  Just press something and cycle to the next.

Yes, you can do that.

You could also have a knob you turn to select the image.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, got an LOLShield put together and working.  Now I just have to figure out how to create my own emoticons an make it to where a switch changes them  smiley-confuse

Video
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 79
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Cool project!
Logged

Offline Offline
Sr. Member
****
Karma: 6
Posts: 429
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

maybe you could mount them into something like this?
http://www.ebay.co.uk/itm/Bolle-SUPREME-Spare-Face-Shield-Visor-/251122459304?pt=UK_BOI_ProtectiveGear_RL&hash=item3a7810a2a8
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Thanks for the tip.  Mounting is not an issue yet.  Learning how to program this darned thing is making my brain hurt.  According to Jimmie P Rodgers website, all you have to do is download and install the library, which as you have seen by my video clip I have done and got it to light up USING THE INCLUDED EXAMPLES.  No where can I find how to vreate my own files.  There is a template OSD file but the ones in the libraries are PDE files?!?  Sorry if I sound frustrated (I'm tired at this point and need sleep) but I cannot find anything online about how to do what it is I am wanting to do.  Sure, I can edit the template file, I understand 1s and 0s but what do I do with the file after I modify it?
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 201
Posts: 8701
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The display is 14x9 pixels and each image is stored as 9 integers where the low 14 bits of each integer are used.
Code:
uint16_t BitMap[9] PROGMEM =
{ // All off
0b00000000000000,
0b00000000000000,
0b00000000000000,
0b00000000000000,
0b00000000000000,
0b00000000000000,
0b00000000000000,
0b00000000000000,
0b00000000000000
};

You can have an array of bitmaps and reference them by index:
Code:
uint16_t BitMaps[][9] PROGMEM =
{ // Index 0: All off
0b00000000000000,
0b00000000000000,
0b00000000000000,
0b00000000000000,
0b00000000000000,
0b00000000000000,
0b00000000000000,
0b00000000000000,
0b00000000000000
};
{ // Index 1: Checkerboard
0b11001100110011,
0b11001100110011,
0b00110011001100,
0b00110011001100,
0b11001100110011,
0b11001100110011,
0b00110011001100,
0b00110011001100,
0b11001100110011
},
{ // Index 2: All on
0b11111111111111,
0b11111111111111,
0b11111111111111,
0b11111111111111,
0b11111111111111,
0b11111111111111,
0b11111111111111,
0b11111111111111,
0b11111111111111
}
};

LoLShield_BasicTest.pde has the code for copying a bitmap to the display.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I know you are trying to help but that just made me feel more dumb.  What am I supposed to do with the LOL-Shield-Animation-Template.osd file that will allow me to make my own .pde file?
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 201
Posts: 8701
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I can't find an OSD file anywhere in the library sources. I'm guessing it's supposed to be ODS: Open Document Spreadsheet.  You should be able to open it with Open Office or import it into Google Documents.  I expect it allows you to mark the cells you want lit and then converts the image into a list of 9 integers you can copy and paste into your sketch.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am sorry, it is ODS.  Here is an example of what I am finding online...

Once you have the Arduino, it’s as simple as downloading the LoL Shield Library and programming something fun. The library takes care of the complicated mess of driving a charliplexed display, so you just need to set x and y coordinates to on or off. If you would like to set animations manually you can download the ODS file here.

Okay, so I open the spreadsheet and the layout makes sense to me.  1 for on and 0 for off so I can handle creating the image/emoticon.  How then do I use this spreadsheet that I have modified to show up on my LoL shield?  For someone who has never done this before but knows how to search the internet pretty well, I am finding know tutorials on how to do this.  smiley-confuse
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 201
Posts: 8701
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

All the spreadsheet does is convert binary to decimal.  If you put in the checkerboard pattern from my example you can then copy an paste the integer values:
Code:
{ 13107 ,
13107 ,
3276 ,
3276 ,
13107 ,
13107 ,
3276 ,
3276 ,
13107 },

I chose, in the examples I posted, to enter the data directly as binary constants (0bxxxxxxx).  This saves the step of using the spreadsheet to convert from binary to decimal constants.  Also makes the sketch more readable since you can almost see the image in the sources.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OMG I finally understand.  As I change the 1s and 0s, the value changes to the right.  I took those values, opened the example LoLShield_BasicTest.pde and modified it and then ran/uploaded it and it worked!!!  My next step now would be how do I set the Arduino (or better yet modify the LoLShield_BasicTest.pde file) to where I can use a button to press, and trigger a cycle to the next emoticon?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Alright, I know I am digging up an old thread but I am still working on this.  Using the LOLshield I understand how it works.  I am going to be applying this to an LED matrix that I make myself.  The LEDs are going to be behind a tinted visor so first I need to know how do I make the LEDs brighter as the ones on the LOLshield seem very dim.  Additional not is I am going to be using red and not green (have green lolshield kit).

Second.  So like I said I have the file that I know how to modify to create the different emoticons.  I am still stumped though as to how to trigger the different images/emoticons to cycle.  I would LIKE to have a single button that could be pressed that would tell it to move to the next one.  If that is not possible then I will just have to stick with the cycle that is built into the script and delay it for a longer period of time.  Just would be nice to have some control over it.
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The LEDs are going to be behind a tinted visor so first I need to know how do I make the LEDs brighter as the ones on the LOLshield seem very dim.
They are dim only because they are not on for long. There are other ways to wire LEDs so that individual ones are always on. But, that requires more (constant?) current.

Quote
Additional not is I am going to be using red and not green (have green lolshield kit).
The human eye is less sensitive to red, so the red ones will appear even dimmer.

Quote
I would LIKE to have a single button that could be pressed that would tell it to move to the next one.
So, what is the problem? The state change detection example has all the code you need.

Logged

Pages: 1 [2] 3   Go Up
Jump to: