ARDUINO CHARLIE 3

Posted by J. on Sunday, June 21, 2009

#include Charlieplex.h
#define NUMBER_OF_PINS 5

byte pins[] = {17,16,15,14,13};

Charlieplex charlieplex = Charlieplex(pins,NUMBER_OF_PINS);
charliePin leds[20] =
{
{1,0},{2,1},{3,2},{4,3},
{0,1},{1,2},{2,3},{3,4},
{2,0},{3,0},{4,1},{4,2},
{0,2},{0,3},{1,4},{2,4},
{0,4},{1,3},{3,1},{4,0},
};

void setup(){ /*nothing*/ }

void loop(){
for (int i=0;i<20;i++) {
charlieplex.clear();
charlieplex.charlieWrite(leds[i],HIGH);
delay(50);}
}

0 comments:

Subscribe to: Post Comments (Atom)