diff options
Diffstat (limited to 'Arduino/LEDMatrix/LEDMatrix.pde')
-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); + } + } +} |