Commit Graph
40 Commits
Author SHA1 Message Date
root 0d7daf3b9c Experimental: Allow commenting out DOUBLE_BUFFER and/or GRAYSCALE to remove
the relevant code.  In particular, turning off both reduces the video buffer
RAM from 336 bytes to 24.
2013-08-20 18:28:46 +00:00
root 2853bbb288 Also fix the last row for Draw90(). 2013-08-20 17:59:43 +00:00
root 134730bfd4 Move ledMap[] into PROGMEM, saving precious RAM. 2013-08-20 17:44:47 +00:00
root b2b335ce0e Undef MEASURE_ISR_TIME. 2013-08-20 07:36:25 +00:00
root 5067125687 Change the grayscale curve to something that seems subjectively better. 2013-08-20 06:54:34 +00:00
root 99638f81c5 Remove unneeded Serial.Begin(). 2013-08-20 06:43:24 +00:00
root 796e2e6b15 Fix drawing in the last row (per issue 28). 2013-08-20 06:19:14 +00:00
root 8ba1f20048 More cleanup to LedSign::SetBrightness(). Reduces code size another 82 bytes. 2013-08-20 06:03:03 +00:00
root c4198ad518 Make these run in double buffer mode. 2013-08-20 05:56:27 +00:00
root 1cd3d973ba Rename these so that the Arduino IDE shows them in the examples. 2013-08-20 05:49:47 +00:00
root ef824cdf00 Make this actually compile again. 2013-08-20 05:48:18 +00:00
root 7f827f214e Patch from issue 34 (updated from issue 16).
Add Mega 1280/2560 support.
2013-08-20 05:41:32 +00:00
root c96d9da167 Patch from issue #33.
Fix off by one errors that were sending too large a value to LedSign:Set()
for the grayscale level.
2013-08-20 05:38:46 +00:00
root c36882dfa2 Patch from Issue #32.
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)

Also fixed several bugs in LedSign::SetBrightness(), which caused weird
grayscale gradiations and reduced brightness by not using a 100% duty cycle
for the maximum setting.
2013-08-20 05:35:53 +00:00
zkarcher 7d9cd5726b Added two grayscale examples: DoubleHelix and Plasma. 2012-08-14 21:03:19 +00:00
thilo.alexander d69e8f9227 Move LoLShield remote control tool into lolcomm sketch dir
The remote control command line application resided in
    parallel to all the other LoLShield sketches but is
    actually not a sketch but a Linux application. This change 
    moves the tool into a subdirectory below the lolcomm
    sketch.

    Signed-off-by: Thilo Fromm <kontakt@thilo-fromm.de>
2012-01-15 05:30:26 +00:00
thilo.alexander 9ef886788e Introducing LoLcomm - set LEDs via the serial port.
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!

    Signed-off-by: Thilo Fromm <kontakt@thilo-fromm.de>
2012-01-13 19:33:53 +00:00
thilo.alexander e9dea8b2b7 Removed unnecessary serial initialisation. 2012-01-13 17:54:37 +00:00
thilo.alexander db05a29ac7 Grayscale enhancements, PLEASE REVIEW; see issue #20.
This patch enhances the grayscale work by Matt Mets.

    -----------------------------------------------------
    THESE CHANGES NEED REVIEW. PLEASE REVIEW THE CHANGES.
    -----------------------------------------------------

    We now support a total of 8 different shades (including black / OFF)
    by solely relying on the high resolution timer.
    PLEASE REVIEW these changes made to Charlieplexing.cpp.

    COLORS has been renamed to SHADES.
    BIT_DEPTH has been removed; SHADES can be set directly.

    A FADE example based on Matt's has been added and extended
    to allow for "performance tests".

    BasicTest has been extended to use double buffering. Since the buffer
    is redrawn in a loop it uses synchronized buffer flip.

    A new mini-example "Breathe" has been added. "Breathe" simply fades
    all the LEDs from off to on and back to off again, not unlike the 
    power LEDs of some laptop brands when the laptop is in suspend.
    "Breathe" can be used to fine-tune the brightness of the individual 
    shades. Currently the transitions feel far from fluent; I think we
    could do better.

    Signed-off-by: Thilo Fromm <kontakt@thilo-fromm.de>
2012-01-07 22:37:32 +00:00
thilo.alexander af145d3e13 Add grayscale test to LoLShield_BasicTest; implements issue #19
See LoLShield issue tracker
    (http://code.google.com/p/lolshield/issues/detail?id=19):

    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.

    Signed-off-by: Thilo Fromm <kontakt@thilo-fromm.de>
2012-01-07 07:43:41 +00:00
thilo.alexander fadb4edd52 Fix memory corruption in LedSign::Init; issue #18
From the LoLShield issue tracker 
    (http://code.google.com/p/lolshield/issues/detail?id=18):

    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. 


    Wow, this one is NASTY! SetBrightness() is called way too early 
    during init(), at a time where backTimer* has not been initialised. 
    Since SetBrightness() writes to places where backTimer* is pointing 
    the function will write into raw memory *somewhere*, problably into 
    code being executed.

    Signed-off-by: Thilo Fromm <kontakt@thilo-fromm.de>
2012-01-07 07:33:26 +00:00
thilo.alexander fee46dddaf Make the source compile with Arduino 1.0; fix issue #17
This patch makes the LoLShield sources compile with Arduino 1.0

    From the LoLShield issue tracker: (http://code.google.com/p/lolshield/issues/detail?id=17):

    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 ;)

    This patch has been tested on ARDUINO 1.0 ONLY!


    Signed-off-by: Thilo Fromm <kontakt@thilo-fromm.de>
2012-01-07 07:24:41 +00:00
matt.mets 358f3c89c8 Add preliminary grayscale support to the library. There are still some issues:
- Backwards compatibility mode for b&w should take fewer cycles
- Brightness doesn't get dark enough (minimum timer length issues)
- Only Atmega328 is probably going to work (timing not determined by clock speed)
2010-08-21 17:56:59 +00:00
matt.mets 22086d9ba3 Add gif converter, sample art 2010-08-19 03:43:54 +00:00
matt.mets b24ace7799 Add font generator utility, and a few sample fonts. This allows one to draw a
font in a graphics program, and turn it into program code automatically. Note
that fonts can currently only be 8 pixels high.
2010-07-21 08:56:59 +00:00
matt.mets cdf10abb87 Bugfix: Set() couldn't turn off pixels. Remove stray comment 2010-07-21 06:45:07 +00:00
matt.mets bddd7c885d Bugfix: fix syntax error, remove debug signal on analog pin 5 2010-07-21 05:29:52 +00:00
matt.mets a8c74859a0 Halve prescaler values for atmega48/88/168/328, to get better timing resolution 2010-07-21 05:18:42 +00:00
matt.mets 4e64faf719 Fix issue 1: Fewer LEDs lit at a time
Splits the display routine into twice as many steps, and divide the outputs based on the high pins
2010-07-21 04:57:21 +00:00
matt.mets e07ce62ddf Add brightness control, to vary the intensity of the entire display. 2010-07-21 02:07:26 +00:00
matt.mets 8a3adf743c Bugfix: Forgot to rename pong2 during last update 2010-07-20 03:49:27 +00:00
matt.mets b1fcdfc4c3 Rename all of the example files to standardize 2010-07-20 02:35:16 +00:00
matt.mets 301b2949af Add Matt Mets to the authors list 2010-07-19 23:27:09 +00:00
matt.mets 9ff1983bf2 Move example programs into lib/examples, to make packaging easier. 2010-07-19 23:24:14 +00:00
matt.mets d9f0159843 Move fonts to progmem, to lower ram usage. (Issue 8)
Fix mis-handling of last row (Issue 9)
2010-07-19 06:45:40 +00:00
matt.mets c5ecf11730 Add Font and Figure keywords 2010-05-28 07:21:20 +00:00
matt.mets ed2293c62e Enumerate the keywords from the Charliplexing library, so that the Arduino IDE can highlight them. 2010-05-28 07:18:58 +00:00
matt.mets 3083aa20d1 Update pong2 game to use the double-buffering features of the Charliplexing
library
2010-05-28 06:59:45 +00:00
matt.mets 4d1c6797fb Add double-buffer support to the Charliplexing library 2010-05-28 06:58:47 +00:00
BenjaminSonntag 455a684335 Adding initial code source 2010-01-07 16:19:43 +00:00