hi, im new to programming with the arduino and i wrote this code to do a simple knight rider led circuit with 2 shift registers and a led in between them, and i had to write out all the coding for it. I was wondering if there was any way to shorten the code i wrote, if you do know how to shorten it, could you also describe how you did it. thanks
#define data 2
#define clock 3
#define data1 4
#define clock1 5
int time = 5;
byte a = B10000000;
byte b = B01000000;
byte c = B00100000;
byte d = B00010000;
byte e = B00001000;
byte f = B00000100;
byte g = B00000010;
byte h = B00000001;
byte i = B00000000;
byte j = B00000010;
byte k = B00000100;
byte l = B00001000;
byte m = B00010000;
byte n = B00100000;
byte o = B01000000;
byte p = B10000000;
byte q = B00000000;
void setup()
{
 pinMode(clock, OUTPUT); // make the clock pin an output
 pinMode(data , OUTPUT); // make the data pin an output3
 pinMode(data1, OUTPUT);
 pinMode(clock1, OUTPUT);
 pinMode(7, OUTPUT);
}
void loop()
{
 shift(a);
 shift(b);
 shift(c);
 shift(d);
 shift(e);
 shift(f);
 shift(g);
 shift(h);
 shift(i);
 flash(time);
 shift1(a);
 shift1(b);
 shift1(c);
 shift1(d);
 shift1(e);
 shift1(f);
 shift1(g);
 shift1(h);
 shift1(j);
 shift1(k);
 shift1(l);
 shift1(m);
 shift1(n);
 shift1(o);
 shift1(p);
 shift1(q);
 flash(time);
 shift(h);
 shift(j);
 shift(k);
 shift(l);
 shift(m);
 shift(n);
 shift(o);
}
void shift(int letter)
{
 shiftOut(data, clock, LSBFIRST, letter);
 delay (time);
}
void shift1(int letter)
{
 shiftOut(data1, clock1, LSBFIRST, letter);
 delay(time);
}
void flash(int duration)
{
 digitalWrite(7, HIGH);
 delay(duration);
 digitalWrite(7, LOW);
}