summaryrefslogtreecommitdiffstats
path: root/Matrix_5x6/Charlie/Charlie.pde
blob: a0d2b737a4d949797291770c8d240b1e4632db40 (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
#include <Charlieplex.h>

#define NUMBER_OF_PINS 6
byte pins[] = {2,3,4,5,6,7};
Charlieplex charlieplex = Charlieplex(pins,NUMBER_OF_PINS);

charliePin ledi[] = { {0, 1} , {1, 0} , {2, 0} , {3, 0} , {4, 0} , {5, 0},
                      {0, 2} , {1, 2} , {2, 1} , {3, 1} , {4, 1} , {5, 1},
                      {0, 3} , {1, 3} , {2, 3} , {3, 2} , {4, 2} , {5, 2},
                      {0, 4} , {1, 4} , {2, 4} , {3, 4} , {4, 3} , {5, 3},
                      {0, 5} , {1, 5} , {2, 5} , {3, 5} , {4, 5} , {5, 4},
                    };

int an  = 2;
int aus = 10;

void setup(){ /*nothing*/ }
 
void loop(){
  int i;
  for (i=0; i<30; i++){
    charlieplex.charlieWrite(ledi[i],HIGH);
    delay(an);
    charlieplex.clear();
    delay(aus);
  }
      

}