Hi first sorry for my ENG. Really Big Sorry
iv got a problem im fighting wit this all week.
first i adapt code ::
byte A[] = {
B00111100,
B01100110,
B11000110,
B11000110,
B11000110,
B11111110,
B11000110,
B11000110};
byte R[] = {
B11111000,
B11000110,
B11000110,
B11000110,
B11000110,
B11011100,
B11001100,
B11000110};
byte D[] = {
B10000000,
B10000000,
B10000000,
B10000000,
B10000000,
B10000000,
B10000000,
B10000000};
const int columnPins[] = { 13,12,11,10,9,8,7,6}; //wartosc oryginalna
//const int columnPins[] = { 6,7,8,9,10,11,12,13}; //wartosc zmieniona
//const int rowPins[] = { 5,4,3,2,15,16,17,18}; //wartosc oryginalna
const int rowPins[] = { 18,17,16,15,2,3,4,5}; //wartosc zmieniona
void setup() {
int i =0;
for ( i = 0; i < 8; i++)
{
pinMode(rowPins[i], OUTPUT); // make all the LED pins outputs
pinMode(columnPins[i], OUTPUT);
digitalWrite(columnPins[i], HIGH); // disconnect column pins from Ground
}
}
void loop() {
int pulseDelay = 1 ; // milliseconds to wait between beats
//show(smallHeart, 80); // show the small heart image for 100 ms
show(A,2000);
show(R,2000);
show(D,2000);
// followed by the big heart for 200ms
delay(pulseDelay); // show nothing between beats
}
// routine to show a frame of an image stored in the array pointed to by the
// image parameter.
// the frame is repeated for the given duration in milliseconds
void show( byte * image, unsigned long duration)
{
unsigned long start = millis(); // begin timing the animation
while (start + duration > millis()) // loop until the duration period has passed
{
for(int row = 0; row < 8; row++)
{
digitalWrite(rowPins[row], HIGH); // connect row to +5 volts
for(int column = 0; column < 8; column++)
{
boolean pixel = bitRead(image[row],column);
if(pixel == 1)
{
digitalWrite(columnPins[column], LOW); // connect column to Gnd
}
delayMicroseconds(300); // a small delay for each LED
digitalWrite(columnPins[column], HIGH); // disconnect column from Gnd
}
digitalWrite(rowPins[row], LOW); // disconnect LEDs
}
}
}
to my Arduino is working fine just perfect , but when im trying with flying message is not working only random dots are showing
please maybe some of more experience people will help me.
this code
is only a part but is making me crazy
// pin[xx] on led matrix connected to nn on Arduino (-1 is dummy to make array start at pos 1)
int pins[17]= {-1, 5, 4, 3, 2, 14, 15, 16, 17, 13, 12, 11, 10, 9, 8, 7, 6};
// col[xx] of leds = pin yy on led matrix
int cols[8] = {pins[13], pins[3], pins[4], pins[10], pins[06], pins[11], pins[15], pins[16]};
// row[xx] of leds = pin yy on led matrix
int rows[8] = {pins[9], pins[14], pins[8], pins[12], pins[1], pins[7], pins[2], pins[5]};
is part of code from arduino website with FT.1.
and when i change the col and row to my one is not working
// pin[xx] on led matrix connected to nn on Arduino (-1 is dummy to make array start at pos 1)
int pins[17]= {-1, 5, 4, 3, 2, 14, 15, 16, 17, 13, 12, 11, 10, 9, 8, 7, 6};
i dont get it why is there pin 17 in originally code when this pin is not even used please help and why the pins are set in this order please help.