summaryrefslogtreecommitdiffstats
path: root/Matrix_5x6/Charlie/Charlie.pde
blob: 9ecc80d7115704022c42adb899c9be08bffbffbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <Charlieplex.h>

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

charliePin led0 = { 0 , 1 };//HIGH when current flows from 2 to 3
charliePin led1 = { 1 , 0 };//HIGH when current flows from 3 to 2 

boolean singleOn = false;
int wait = 500;

void setup(){ /*nothing*/ }
 
void loop(){
  charlieplex.charlieWrite(led0,HIGH);
  delay(wait);
  charlieplex.charlieWrite(led1,HIGH);
  delay(wait);
  charlieplex.clear();
  delay(wait);
}