jprodgers / lolshield Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/lolshield
Automatically exported from code.google.com/p/lolshield
Using a single-buffered grayscale display, I can't tell a difference between
"uint8_t pixels[SHADES][24]" and "uint8_t pixels[SHADES][48]" - and the
subsequent commentary makes me suspect that 48 is simply 24 bytes per frame * 2
frames. As that means the leds structure takes up 768 bytes, the amount of ram
available for user projects is limited unnecessarily. Especially since that
structure is allocated twice, once for the work buffer and once for the display
buffer, but I haven't poked at it enough to be certain.
imac:bin pfriedel$ ./avr-objdump -t -j .bss OneTenClock.cpp.elf
OneTenClock.cpp.elf: file format elf32-avr
SYMBOL TABLE:
[...snip...]
0080027a g O .bss 00000300 leds
[...snip...]
Versus:
imac:bin pfriedel$ ./avr-objdump -t -j .bss OneTenClock.cpp.elf
OneTenClock.cpp.elf: file format elf32-avr
SYMBOL TABLE:
[...snip...]
0080029e g O .bss 00000180 leds
[...snip...]
With a related decrease in the bss allocation:
imac:bin pfriedel$ ./avr-size OneTenClock.cpp.elf
text data bss dec hex filename
15208 376 1371 16955 423b OneTenClock.cpp.elf
imac:bin pfriedel$ ./avr-size OneTenClock.cpp.elf
text data bss dec hex filename
16626 376 987 17989 4645 OneTenClock.cpp.elf
I'm not quite proficient enough with C header programming to make this do the
right thing when it's not being used in a double buffered application, but it
seems like it should be reasonably straightforward. Ultimately it seems like
it should allocate 48 when double buffered grayscale, 24 when single buffered
grayscale, and (???) when double-buffered B&W and single buffered B&W. To be
honest, the interrupt code makes my eyes cross.
There's also a spurious Serial.end() in Charliplexing.cpp that causes the
serial library to get pulled in unexpectedly. It wasn't until I started
looking at an object dump trying to figure out where all my memory was going
that I saw that Serial was getting pulled in that I took a closer look at my
libraries.
Or I'm just missing a subtlety that only comes up when you're using all 136
LEDs on an official LoL Shield that isn't apparently on my stripboard 110-LED
project, in which case you can ignore this.
Original issue reported on code.google.com by [email protected]
on 30 May 2012 at 1:15
What steps will reproduce the problem?
1. Run BasicTest with lolshield 0.2 release, watch LEDs.
2. Run BasicTest with latest lolshield svn, watch LEDs.
What is the expected output? What do you see instead?
Expected: Steady LED lights when they are switched on, like they did in
lolshield-0.2 release.
Instead: LEDs flicker annoyingly. They do not seem to be at 100% brightness,
but that's a guess.
Original issue reported on code.google.com by [email protected]
on 6 Jan 2012 at 1:14
What steps will reproduce the problem?
1. Figure won't display to bottom and right edge of display
2. Hardcoded x and y limits of 13 and 8 are incorrect for 14 x 9 shield
3. Easily changed - or have an Init routine with width and height
What is the expected output? What do you see instead?
Output near edge of display doesn't work
What version of the product are you using? On what operating system?
v1.0 arduino ide
Please provide any additional information below.
Font library also appears to have incorrect constants - maybe initially written
for a smaller LOL shield. Font library doesn't seem to work however (test
program gives blank display)
Original issue reported on code.google.com by [email protected]
on 7 Nov 2012 at 10:02
I updated the Mega 1280/2560 support from Issue #16:
* to apply after the changes in Issue #32,
* to reduce code size (by internally remapping a few pins),
* to make it glitch-free.
Note that the original Mega (1280), like many boards, does not have a buffer on
the pin 13 LED, which screws up the shield display pretty badly.
Original issue reported on code.google.com by [email protected]
on 19 Aug 2013 at 11:16
Attachments:
What steps will reproduce the problem?
1. Plug in Ardunio
2. Open Test sketch
3. Try Uploading
What is the expected output? What do you see instead?
Nothing happens because of error uploading
What version of the product are you using? On what operating system?
using Arduino Uno, with Arduino 0022 IDE. LoL SHield v 1.5 and Library v23
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 19 Jan 2012 at 1:17
Just installed LoL Shield SHD library, loaded Basic_Test and then ran into the
following compilation error.
Does anyone have any pointers on what to do?
Arduino: 1.6.4 (Mac OS X), Board: "Arduino Uno"
In file included from Basic_Test.pde:31:0:
Basic_Test:49: error: variable 'BitMap' must be const in order to be put into
read-only section by means of '__attribute__((progmem))'
variable 'BitMap' must be const in order to be put into read-only section by
means of '__attribute__((progmem))'
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
Original issue reported on code.google.com by [email protected]
on 17 May 2015 at 9:57
I did some very minor grayscale enhancements to reap low hanging fruits:
- include Matt's "Fade" example
- remove BIT_DEPTH since it does not seem to be used anywhere
- rename COLORS to SHADES since there really is only one color ;)
- set SHADES to "5" (resulting in 4 shades plus black, i.e. OFF); this
seems to be the maximum bearable amount of shades the device can produce
as of now.
Opinions? Rejections?
Original issue reported on code.google.com by [email protected]
on 7 Jan 2012 at 8:16
Library keywords don't appear highlighted in the Arduino IDE. Adding a
keywords.txt file should correct this.
From: http://arduino.cc/en/Hacking/LibraryTutorial
If you tried the new sketch, you probably noticed that nothing from our
library was recognized by the environment and highlighted in color.
Unfortunately, the Arduino software can't automatically figure out what
you've define in your library (though it would be a nice feature to have),
so you have to give it a little help. To do this, create a file called
keywords.txt in the Morse directory. It should look like this:
Morse KEYWORD1
dash KEYWORD2
dot KEYWORD2
Each line has the name of the keyword, followed by a tab (not spaces),
followed by the kind of keyword. Classes should be KEYWORD1 and are colored
orange; functions should be KEYWORD2 and will be brown. You'll have to
restart the Arduino environment to get it to recognize the new keywords.
Original issue reported on code.google.com by [email protected]
on 28 May 2010 at 6:32
What steps will reproduce the problem?
1. Pass an argument to Set() that is not zero and not one, like "Set(x, y,
100)".
What is the expected output? What do you see instead?
I'd expect a non-zero value to cause the LED to be lit. Standard boolean
behavior is zero==false (or off) and non-zero==true (or on). The way it is now,
a non-one value will cause the LED to be off.
Please provide any additional information below.
You can "fix" this by changing the "if (c == 1)" in LedSign::Set() to "if (c !=
0)"
From this:
void LedSign::Set(uint8_t x, uint8_t y, uint8_t c)
{
uint8_t pin_low = ledMap[x*2+y*28+1];
uint8_t pin_high = ledMap[x*2+y*28+0];
if (c == 1) {
workBuffer[(pin_low-2)*2 + (pin_high / 8)] |= _BV(pin_high & 0x07);
}
else {
workBuffer[(pin_low-2)*2 + (pin_high / 8)] &= ~_BV(pin_high & 0x07);
}
}
To this:
void LedSign::Set(uint8_t x, uint8_t y, uint8_t c)
{
uint8_t pin_low = ledMap[x*2+y*28+1];
uint8_t pin_high = ledMap[x*2+y*28+0];
if (c != 0) {
workBuffer[(pin_low-2)*2 + (pin_high / 8)] |= _BV(pin_high & 0x07);
}
else {
workBuffer[(pin_low-2)*2 + (pin_high / 8)] &= ~_BV(pin_high & 0x07);
}
}
Original issue reported on code.google.com by [email protected]
on 4 Aug 2011 at 1:12
Anyone know of a way o switch between "LedSign::Init();" and
"LedSign::Init(DOUBLE_BUFFER | GRAYSCALE);" within a sketch?
I am building Christmas tree ornaments based on the LoL shield and need to to
go from text to graphics.
Original issue reported on code.google.com by [email protected]
on 16 Nov 2014 at 10:42
Build in object management would be great for game development. Some of the
existing memory issues will need to be resolved first.
Being able to simply move an object, and have it detect walls would be
nice. Also being able to scroll anything arbitrary like text or images
would be made much easier.
Original issue reported on code.google.com by [email protected]
on 28 May 2010 at 6:01
The game examples all seem to require an additional potentiometer and/or
button, but it isn't clear how they should be connected. A set of
directions would be excellent!
Original issue reported on code.google.com by [email protected]
on 28 May 2010 at 6:30
What steps will reproduce the problem?
1. Using Arduino IDE 022
2. Load Tetris example
3. Try to compile it.
What is the expected output? What do you see instead?
I expect it to compile and indicate how much ram it'll use. Instead I get
warnings about C++ incompatibilities.
What version of the product are you using? On what operating system?
LoL shield 1.5, Library version .2beta, Arduino IDE 022, Mac OS X 10.6.6
Please provide any additional information below.
Comment your source code.
Original issue reported on code.google.com by [email protected]
on 26 Jan 2011 at 2:05
This version of charlieplexing.cpp uses analog pins instead of digital 8-13 to
allow the use of ethernet shield.
Original issue reported on code.google.com by [email protected]
on 3 May 2012 at 10:35
Attachments:
At all times two LEDs in the upper right corner are lit at all times. It
seems to go across all versions of Arduino that I've tried. It does not
happen if the refresh rate is slowed down to light only individual LEDs.
Only when it is refreshing at a decent rate.
Original issue reported on code.google.com by [email protected]
on 28 May 2010 at 5:58
This patch reduces the code size and improves the CPU performance of
Charliplexing.cpp by:
* removing zeroed data in videoPage
* precalculating information for LedSign::Set()
* removing unneeded register writes in TIMER2_OVF_vect()
* using a roving pointer to access the display buffer rather than recalculating
the array index each time
* eliminating the extra blank interval (1/8 display cycles)
* eliminating an extra display “cycle” (which could also display garbage)
On my test platform, this:
* reduced code size by 178 bytes
* increased the FadeTest max FPS from 55 to 71
* increased brightness (not sure how much offhand)
Original issue reported on code.google.com by [email protected]
on 18 Aug 2013 at 7:46
Attachments:
I am trying to upload lol shield double helix and I am getting ledsign error.....its says "LedSign has not been declared"
The current text sketch works, but it is very limited due to memory
constraints. Current letters are stored as individual points that are moved
around. A single letter can take up 8-34 bytes each! That eats up the available
2k of RAM very quickly.
Just putting all the fonts in progmem would help. The fonts will need to be
stored in bit arrays. They really shouldn't be any larger than 5-9 bytes per
letter, one for each vertical line. A full ASCI character set shouldn't be more
than 2k stored in ROM, and that's a full board height font. Though adding a
single byte at the beginning of each character could allow for each letter to
have it's own width, and would allow for some kerning.
It would probably be helpful to do the object tracking library first, as that
would make the font one much easier. Storing and reading to ROM is fairly
straightforward.
Original issue reported on code.google.com by [email protected]
on 13 Jul 2010 at 3:49
It would be cool to add grayscale support to the display.
Original issue reported on code.google.com by [email protected]
on 21 Jul 2010 at 6:31
It would be neat to be able to be able to programatically adjust the
brightness of the display, to be able to fade images in and out. This might
be possible to do by varying the duty cycle of the display, perhaps by
using a second timer to turn the LED pins off early.
Original issue reported on code.google.com by [email protected]
on 7 Jun 2010 at 8:33
Have you thought about the future of this project?
Thanks!
Original issue reported on code.google.com by [email protected]
on 9 May 2015 at 7:24
What steps will reproduce the problem?
1. set lolshield with "LedSign::Init(GRAYSCALE);"
2. Send text to LoLshield via Myfont::Banner(tLen,Text);
3. LedSign::SetBrightness(); Is ignored due to draw code in Myfont.cpp
What is the expected output? What do you see instead?
Expected: Variable led shades due to LedSign::SetBrightness(); initialization
within code. Instead: Myfont:Banner uses the below to draw the text. "tmps"
sets the brightness when the (GRAYSCALE) option is used.
[code] LedSign::Set(xval+i, j+1, tmps); /*write it*/ [/code]
What version of the product are you using? On what operating system?
LolShield v1.5, v0.23 Library
Original issue reported on code.google.com by [email protected]
on 3 Mar 2012 at 11:35
The Lol-Shield library is not compatible with Arduino Atmega 2560 out of the
box. All basic sketches fail, no LED lights.
I think this fails because there is no timer enabling routine in
"Charliplexing.cpp" for the Atmega 2560. The timer codes start at line 154 but
it lacks one for the 2560.
Original issue reported on code.google.com by [email protected]
on 29 Dec 2012 at 1:19
The library currently uses a namespace-based approach to segmenting itself,
where as the standard for Arduino libraries appears to be a class-based
approach. The current implementation works perfectly fine, however it
might be preferable to encapsulate the library into a class for consistency
with the broader Arduino community.
Original issue reported on code.google.com by [email protected]
on 28 May 2010 at 6:38
... and along with it a lot of the documentation for this project.
I am trying to get one of these working with a new Uno board.
Is there another source for all the files and documents? The LoLShield
V0.2.beta.zip readme refers to -libs and -font folders(?) which are not in the
ZIP file. SparkFun's links at http://www.sparkfun.com/products/9796 just go
here and to the dead web site.
TIA
Bruce
Original issue reported on code.google.com by [email protected]
on 10 Jul 2011 at 10:16
LoLcomm is an example application which enables you to set individual LEDS, or
set the whole shield via the serial port. You can also pulse the shield, or
pulse individual LEDs (using grayscale).
I also provide a Linux command line tool for remote-controlling the LED shield.
This enables you to play around with LED patters and even to script your shield.
Have fun!
Available since SVN revision 25 or later.
Original issue reported on code.google.com by [email protected]
on 13 Jan 2012 at 7:34
When running in 'black and white' (i.e. non-GRAYSCALE) mode, there's no need
for Set to run through the for loops or increment pointers.
The attached patch provides a noticeable improvement when Set() is being called
as rapidly as possible.
Original issue reported on code.google.com by [email protected]
on 17 Nov 2013 at 4:38
Attachments:
What steps will reproduce the problem?
1. Just run the fonntest example
2.
3.
What is the expected output? What do you see instead?
I'd expect to see the fonts displayed as per a youtube video I saw
What I actually see is nothing
What version of the product are you using? On what operating system?
Charliplexing.cpp V0.9
Font.cpp V 0.0
fonttest.pde V1.0
Please provide any additional information below.
I had to change WProgram.h to Arduino.h
Basic_Test passes OK, so I guess the shield is wired up correctly.
Charli_heart appears to start OK but soon degenerates into a mess of LEDs
Grayscale produces wavy diagonal lines
invader, life, LoLShield_breath, pong2 and myfont all work OK.
tetris won't compile
Original issue reported on code.google.com by [email protected]
on 10 Dec 2012 at 10:58
What steps will reproduce the problem?
1. arduino 022
2. Mega 2560
3. LOL shield
What is the expected output? What do you see instead?
Nothing the charlieplex library is incompatible with Mega 1280/2560
What version of the product are you using? On what operating system?
see above
Please provide any additional information below.
http://arduino.cc/forum/index.php/topic,76626.0.html thread on this.
Original issue reported on code.google.com by [email protected]
on 26 Oct 2011 at 9:40
What steps will reproduce the problem?
1. Build LOLshield.
2. Put it on a Leonardo.
3. Install LOLshield library code.
4. Connect LOLshield+Leonardo combi to computer.
5. Load Basic_Test example sketch.
What is the expected output? What do you see instead?
All dark LEDs. Some random LEDs light when you upload other,
non-LOLshield sketches.
What version of the product are you using? On what operating system?
LOLshield library v0.23
LOLshield 1.5
Arduino IDE 1.0.1
Arduino Leonardo
Mac OS X 1.6 (Snow Leopard)
Please provide any additional information below.
My LOLshield is not bad. I performed the above steps, substituting an Uno for
the Leonardo and everything worked as expected.
Original issue reported on code.google.com by [email protected]
on 11 Jun 2012 at 4:45
When using the Font::Draw command to draw text that should be drawn through the
14th row, the row is blank instead of lighting up. I would expect the text to
be drawn through this row.
Original issue reported on code.google.com by [email protected]
on 19 Jul 2010 at 6:45
I bought a beta kit from Mitch at 35C3, but the LEDs do not match the footprint. I tried to open the schematic but kicad does not recognize the file type. Can you tell me which way the LEDs need to be soldered?
Thanks!
This is an experiment strobing the display in 12 cycles rather than 24, which
(in theory) doubles the light output. I haven't studied it scientifically, but
the output looks about as even as before.
As a bonus, it greatly simplifies the logic in the ISR, and even makes the
compiled code smaller.
Original issue reported on code.google.com by [email protected]
on 20 Aug 2013 at 8:50
Attachments:
Currently the library allows for up to 11 LEDs to be lit at once.
Unfortunately, the Arduino doesn't supply enough current to light all of
them brightly, so you get a dimming across the bus. However, decreasing the
number of LEDs lit at once decreases the frame rate.
It needs to be determined at what point the number of LEDs lit, and the
frame rate is both uniform and acceptable for the LoL Shield.
Original issue reported on code.google.com by [email protected]
on 28 May 2010 at 5:56
What steps will reproduce the problem?
When I load Charlieplexing.h and Wire.h, and then call the req'd
"LedSign::Init()" in the void.setup(), it seems the sketch crashes.
In the code example below, when the LedSign::Init is commented out, The Serial
Monitor shows:
init (command before the fouling Init)
made it (command following the fouling - but commented out- Init)
get time (the proper operations in the loop())
...
... and works properly (it won;t show every second, as there are a number of
debugging delay() statements)
When LedSign::Init() is active, all I get in the serial monitor is:
init command before the fouling Init
...
(chirping crickets)
...
1. any arduino I have (Mega, Duemillablahblahblah, and ProMini5/16
2. Macetech Chronodot
3. charlieplex network w/ 72 LEDS
What is the expected output? What do you see instead?
i am expecting to see lights. the sketch seems to freeze once either:
Charliplexing or Wire gets init'ed/started.
see below..
What version of the product are you using? On what operating system?
Win7
arduino IDE 1.0 & 1.01
Please provide any additional information below.
Snippet of code:
/*
DS3231_test.pde
Eric Ayars
4/11
Test/demo of read routines for a DS3231 RTC.
Turn on the serial monitor after loading this to check if things are
working as they should.
*/
#include <DS3231.h>
#include <Wire.h>
#include <Charliplexing.h>
DS3231 Clock;
bool Century=false;
bool h12;
bool PM;
byte ADay, AHour, AMinute, ASecond, ABits;
bool ADy, A12h, Apm;
byte year, month, date, DoW, hour, minute, second;
void setup() {
// Start the serial interface
Serial.begin(9600);
delay(1000);
Serial.println(" init "); // <-- This prints, ++
delay(1000);
// LedSign::Init(); // <-- when this is enabled
delay(1000);
Serial.println("made it"); // <-- this doesn't print ++
delay(1000); // <-- Nothing after the LedSign
command executes
// Start the I2C interface
Wire.begin();
}
void loop() {
// send what's going on to the serial monitor.
// Start with the year
Serial.print("get time"); delay(1000);
Serial.print('\n');
delay(1000);
// Display the time once more as a test of the getTime() function
Clock.getTime(year, month, date, DoW, hour, minute, second);
Serial.print(year, DEC);
Serial.print(month, DEC);
Serial.print(date, DEC);
Serial.print(DoW, DEC);
Serial.print(hour, DEC);
Serial.print(minute, DEC);
Serial.println(second, DEC);
}
please help!
Original issue reported on code.google.com by [email protected]
on 1 Jul 2012 at 5:06
uncommented #define MEASURE_ISR_TIME since per default this does not make sense
and might even cause erratic errors
deleted Serial.end() in SetBrightness() which is plain wrong
Original issue reported on code.google.com by [email protected]
on 1 Jul 2013 at 3:08
Attachments:
What steps will reproduce the problem?
1. Start up Arduino dev GUI
2. In the GUI load the "LoLShield BasicTest" example:
File -> Examples -> LoLShield -> LoLShield_BasicTest
3. Press the compile button
What is the expected output? What do you see instead?
Expected: compilation works.
Instead:
libraries/LOLshield/Charliplexing.cpp:32:22: fatal error: WProgram.h: No such
file or directory
What version of the product are you using? On what operating system?
- Latest Arduino GIT (git://github.com/arduino/Arduino.git), rev.
11281ec77ece61aeab64d047ed899d47221dd4a7, 2012-01-05
- latest lolshield SVN, rev 19
Please provide any additional information below.
This is a known bug w/ lolshield code and Arduino 1.0 or newer. Seemingly
Jimmie keeps fixing this every time he encounters the problem in one of his
workshops so I thought patching the actual source in the repository would be
more convenient ;)
I attached a patch file which sets things straight for Arduino 1.0 while still
maintaining compatibility to older releases.
This patch has been tested on ARDUINO 1.0 ONLY!
How to apply the patch:
- check out the lolshield SVN trunk
- put the patch file arduino-1.0-include.patch into the checkout directory
- run
patch -p0 --dry-run < arduino-1.0-include.patch
Original issue reported on code.google.com by [email protected]
on 5 Jan 2012 at 1:19
Attachments:
I'm not quite sure what's causing it just yet. It's definitely something in that update though, as an older 1.5 with the same code doesn't do it. Going to dig around and see what I can find.
The patch in Issue #32 isn't quite as tolerant of buggy code sending too large
a value to Set(). This exposed a bug in the Breathe example. Patch included.
Original issue reported on code.google.com by [email protected]
on 18 Aug 2013 at 8:21
Attachments:
Ahm, this is actually an *Enhancement*, not a *Defect*.
Unfortunately I'm unable to change the issue type, guess it's because I'm not a
committer. Or maybe I just cannot find the button that does this.
-------
Add grayscale test to LoLShield_BasicTest.
This patch adds grayscale to the basic LoLShield test.
The test will run three times, increasing the brightness
of the LEDs in each run, then start all over again.
The frame delay has been reduced to a third of
its initial value so the overall runtime of the test
stays the same.
How to apply the patch:
- check out the lolshield SVN trunk
- put the patch file add-grayscale-to-basic-test.patch into the checkout
directory
- run
patch -p0 < add-grayscale-to-basic-test.patch
Original issue reported on code.google.com by [email protected]
on 6 Jan 2012 at 5:40
Attachments:
I just tried enabling DOUBLE_BUFFER for the examples. The fonttest example
doesn't show anything at all and the basic-example only lights up the top-left
LED.
Is this intentional? Does DOUBLE_BUFFER needs special handling?
Original issue reported on code.google.com by ulrich.moritz
on 8 Sep 2011 at 5:57
Arduino 1.0 will introduce some changes. Many won't interference with lolshield
in any way, but one thing will:
WProgram.h got renamed to Arduino.h. In beta3 of Arduino 1.0, this makes
Sketches (and one example) using your library fail to compile.
Original issue reported on code.google.com by ulrich.moritz
on 8 Sep 2011 at 5:44
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.