diff options
author | Christopher Baines <cbaines8@gmail.com> | 2011-09-07 09:44:04 +0100 |
---|---|---|
committer | Christopher Baines <cbaines8@gmail.com> | 2011-09-07 09:44:04 +0100 |
commit | ba3448fb8093afd9d298cef1123a1bedfea13999 (patch) | |
tree | dc4ea674c977a5e76789146aa0de62e758078b9f /Arduino/LEDMatrix | |
parent | cfa29ad09cc9974a0a55e5b25bcc5f59a71d5950 (diff) | |
download | punchingbag-ba3448fb8093afd9d298cef1123a1bedfea13999.tar punchingbag-ba3448fb8093afd9d298cef1123a1bedfea13999.tar.gz |
Added LEDMatrix.pde, this should be used to test the first matrix only! (at the moment). Also added font, this can be used only with java 1.70 and an eclipse maintantice build?
Diffstat (limited to 'Arduino/LEDMatrix')
-rw-r--r-- | Arduino/LEDMatrix/LEDMatrix.pde | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/Arduino/LEDMatrix/LEDMatrix.pde b/Arduino/LEDMatrix/LEDMatrix.pde new file mode 100644 index 0000000..0d3994b --- /dev/null +++ b/Arduino/LEDMatrix/LEDMatrix.pde @@ -0,0 +1,34 @@ +// test program for three cascaded AS1107 +// if you got a different configuration you need to +// modify the library itself. + +#include <AS1107.h> + +// Arduino pins +const byte CsnPin = 2 ; // Chip select (Low active) +const byte ClkPin = 3 ; // Serial Clockq +const byte DataPin = 4 ; // Serial Data + +byte buffer [ 8 ] ; // Screen buffer (No. of modules * 8) +AS1107 matrix ( CsnPin, ClkPin, DataPin ) ; + +const byte d = 0 ; +int count= 1 ; +void setup ( ) +{ + matrix. Init ( buffer, 7, 7, 0 ) ; +} + +void loop ( ) +{ + for (int x=0; x<8; x++) { + for (int y=0; y<8; y++) { + matrix.SetLed(x,y,1); + matrix.Update(); + delay(1000); + matrix.SetLed(x,y,0); + matrix.Update(); + delay(1000); + } + } +} |