5x16 LED Marquee Phantom LEDs Turning On
i have built 5x16 led array make marquee sign. replicating http://www.nerdkits.com/videos/ledarray2/ not many leds (unfortunately
).
there 5 "row wires" , 8 "column wires". each column consists of 2 led columns. putting high through column , low through row turns on left side of each coulmn. reversing high , low lights right side of column.
i found wonderful charlieplexing class on wiki , have made work setup. (http://www.arduino.cc/playground/code/charlieplex)
here problem lies. when using class , cycling through 80 leds, there on pin 0 come on , flash seeming randomly. also, other random pins faintly glowing. know fact isnt wiring/electrical issue because if cycle through hard way, doesnt it. in code causing them flash.
here code:
).there 5 "row wires" , 8 "column wires". each column consists of 2 led columns. putting high through column , low through row turns on left side of each coulmn. reversing high , low lights right side of column.
i found wonderful charlieplexing class on wiki , have made work setup. (http://www.arduino.cc/playground/code/charlieplex)
here problem lies. when using class , cycling through 80 leds, there on pin 0 come on , flash seeming randomly. also, other random pins faintly glowing. know fact isnt wiring/electrical issue because if cycle through hard way, doesnt it. in code causing them flash.
here code:
code: [select]
#include <charlieplex.h>
#define number_of_pins 13
byte pins[] = {0,1,2,3,4,5,6,7,8,9,10,11,12};
charlieplex charlieplex = charlieplex(pins,number_of_pins);
charliepin leds[80] = { {0,12}, {12,0}, {1,12}, {12,1}, {2,12}, {12,2},
{3,12}, {12,3}, {4,12}, {12,4}, {5,12}, {12,5},
{6,12}, {12,6}, {7,12}, {12,7}, {0,11}, {11,0},
{1,11}, {11,1}, {2,11}, {11,2}, {3,11}, {11,3},
{4,11}, {11,4}, {5,11}, {11,5}, {6,11}, {11,6},
{7,11}, {11,7}, {0,10}, {10,0}, {1,10}, {10,1},
{2,10}, {10,2}, {3,10}, {10,3}, {4,10}, {10,4},
{5,10}, {10,5}, {6,10}, {10,6}, {7,10}, {10,7},
{0,9}, {9,0}, {1,9}, {9,1}, {2,9}, {9,2},
{3,9}, {9,3}, {4,9}, {9,4}, {5,9}, {9,5},
{6,9}, {9,6}, {7,9}, {9,7}, {0,8}, {8,0},
{1,8}, {8,1}, {2,8}, {8,2}, {3,8}, {8,3},
{4,8}, {8,4}, {5,8}, {8,5}, {6,8}, {8,6},
{7,8}, {8,7} };
boolean singleon = false;
void setup() { /* nothing */ }
void loop(){
if (singleon) charlieplex.clear();
//cycle through 80 starting @ top left going right
for (int i=0;i<80;i++) {
charlieplex.charliewrite(leds[i],high);
delay(15);
pinmode(leds[i].vcc, input); //2 inputs less calculating time clearing 13 pins
pinmode(leds[i].gnd, input);
}
singleon=!singleon;
}
hello.
could identify index /led causes flashing. ?
i author of library, unfortunantly have not tested above 3 lines.
i'll gladly fixing error/bug.
[edit]
it better use other pins 0 , 1. serial rx tx.
what do?
[untested code]
could identify index /led causes flashing. ?
i author of library, unfortunantly have not tested above 3 lines.

i'll gladly fixing error/bug.
[edit]
it better use other pins 0 , 1. serial rx tx.
what do?
[untested code]
quote
[/edit]
#include <charlieplex.h>
#define number_of_pins 13
//byte pins[] = {2,3,4,5,6,7,8,9,10,11,12,13,14};
byte pins[] = {0,1,2,3,4,5,6,7,8,9,10,11,12};
charlieplex charlieplex = charlieplex(pins,number_of_pins);
charliepin leds[80] = {
{0,12}, {12,0}, {1,12}, {12,1},
{2,12}, {12,2}, {3,12}, {12,3},
{4,12}, {12,4}, {5,12}, {12,5},
{6,12}, {12,6}, {7,12}, {12,7},
{0,11}, {11,0}, {1,11}, {11,1},
{2,11}, {11,2}, {3,11}, {11,3},
{4,11}, {11,4}, {5,11}, {11,5},
{6,11}, {11,6}, {7,11}, {11,7},
{0,10}, {10,0}, {1,10}, {10,1},
{2,10}, {10,2}, {3,10}, {10,3},
{4,10}, {10,4}, {5,10}, {10,5},
{6,10}, {10,6}, {7,10}, {10,7},
{0,9}, {9,0}, {1,9}, {9,1},
{2,9}, {9,2}, {3,9}, {9,3},
{4,9}, {9,4}, {5,9}, {9,5},
{6,9}, {9,6}, {7,9}, {9,7},
{0,8}, {8,0}, {1,8}, {8,1},
{2,8}, {8,2}, {3,8}, {8,3},
{4,8}, {8,4}, {5,8}, {8,5},
{6,8}, {8,6}, {7,8}, {8,7}
};
void setup() { /* nothing */ }
void loop(){
charlieplex.clear();
//cycle through 80 starting @ top left going right
for (int i=0;i<80;i++) {
charlieplex.charliewrite(leds,high);
delay(15);
pinmode(leds.vcc, input); //2 inputs less calculating time clearing 13 pins
pinmode(leds.gnd, input);
}
}
Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > 5x16 LED Marquee Phantom LEDs Turning On
arduino
Comments
Post a Comment