aboutsummaryrefslogtreecommitdiff
path: root/Arduino/LEDMatrix/LEDMatrix.pde
blob: 0d3994b27b0930c4d4183c28b7094d2370fb49a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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);
    }
  }
}