Visually Appealing Auto Signaling

Here is the code to a project that i have that makes Auto signals a little more animated. the boards digital I/O’s are connected to LED’s in the third brake light, and the Analog pins are used for the input signals (these are digital signals btw, i ran out of digital pins lol)

Here is the code.

Im new, and im wondering what you guys think of this. Is the code going to work as i expect it to? any suggestions?

// 3rd Brake Light Sketch
// Josh Nolan
// Start: 4/18/2009
//
// The idea behind this application is to watch a cars rear signaling with analog pins 1, 2, and 3.  When the Right Blinker is enabled,
// a lighting sequence starts that first turns all the LEDs in the third brake light off, then proceeds to light them from Left to Right
// turning them all on, then off in sequence.  This also applies to the Left blinker.
//
//

int Pin0 = 0;
int Pin1 = 1;
int Pin2 = 2;
int Pin3 = 3;
int Pin4 = 4;
int Pin5 = 5;
int Pin6 = 6;
int Pin7 = 7;
int Pin8 = 8;
int Pin9 = 9;
int Pin10 = 10;
int Pin11 = 11;
int Pin12 = 12;
int Pin13 = 13;
int Speed1 = 0;
int Speed2 = 0;
int Lblink1 = 0;
int Rblink2 = 0;
int Brake3 = 0;
int Hazard = 0;

void setup()
{
  pinMode(Pin13, OUTPUT);    
  pinMode(Pin12, OUTPUT);
  pinMode(Pin11, OUTPUT);
  pinMode(Pin10, OUTPUT);
  pinMode(Pin9, OUTPUT);
  pinMode(Pin8, OUTPUT);
  pinMode(Pin7, OUTPUT);   
  pinMode(Pin6, OUTPUT);
  pinMode(Pin5, OUTPUT);      
  pinMode(Pin4, OUTPUT);
  pinMode(Pin3, OUTPUT); 
  pinMode(Pin2, OUTPUT);
  pinMode(Pin1, OUTPUT);
  pinMode(Pin0, OUTPUT);
  Speed1 = 25;
  Speed2 = 250;
  Lblink1 = 0;
  Rblink2 = 0;
  Brake3 = 0;
}
void loop()   //Now we need a set of loops that checks other signals while the current loop is running. The Analog Pin's are actually used as Digital Pins, 
              //I only want to know if they are on or off. Missing Pulse detectors will be used on the Blinkers to give a solid on/off value.
              // 
              //sequence for the brake sequence.
{
  analogRead(Lblink1);
  analogRead(Rblink2);
     while(Lblink1 > 50 && Rblink2 > 50){    //If this is true, the Hazard Lights are engaged.  Start the Hazard sequence->
       digitalWrite(Pin0, LOW);
       digitalWrite(Pin1, LOW);
       digitalWrite(Pin2, LOW);
       digitalWrite(Pin3, LOW);
       digitalWrite(Pin4, LOW);
       digitalWrite(Pin5, LOW);
       digitalWrite(Pin6, LOW);
       digitalWrite(Pin7, LOW);
       digitalWrite(Pin8, LOW);
       digitalWrite(Pin9, LOW);
       digitalWrite(Pin10, LOW);
       digitalWrite(Pin11, LOW);
       digitalWrite(Pin12, LOW);
       digitalWrite(Pin13, LOW);
       digitalWrite(Pin0, HIGH);  //Light up Lights in Paris of two inverted with every other pair,
       digitalWrite(Pin1, HIGH);
       digitalWrite(Pin4, HIGH);
       digitalWrite(Pin5, HIGH);
       digitalWrite(Pin8, HIGH);
       digitalWrite(Pin9, HIGH);
       digitalWrite(Pin12, HIGH);
       digitalWrite(Pin13, HIGH);
       digitalWrite(Pin2, LOW);
       digitalWrite(Pin3, LOW);
       digitalWrite(Pin6, LOW);
       digitalWrite(Pin7, LOW);
       digitalWrite(Pin10, LOW);
       digitalWrite(Pin11, LOW);
       delay(Speed2);
       digitalWrite(Pin0, LOW);
       digitalWrite(Pin1, LOW);
       digitalWrite(Pin4, LOW);
       digitalWrite(Pin5, LOW);
       digitalWrite(Pin8, LOW);
       digitalWrite(Pin9, LOW);
       digitalWrite(Pin12, LOW);
       digitalWrite(Pin13, LOW);
       digitalWrite(Pin2, HIGH);
       digitalWrite(Pin3, HIGH);
       digitalWrite(Pin6, HIGH);
       digitalWrite(Pin7, HIGH);
       digitalWrite(Pin10, HIGH);
       digitalWrite(Pin11, HIGH);
       delay(Speed2);
     }
       
  analogRead(Lblink1);
  while(Lblink1 > 50){
    digitalWrite(Pin0, LOW);  
    digitalWrite(Pin1, LOW);
    digitalWrite(Pin2, LOW);
    digitalWrite(Pin3, LOW);
    digitalWrite(Pin4, LOW);
    digitalWrite(Pin5, LOW);
    digitalWrite(Pin6, LOW);
    digitalWrite(Pin7, LOW);
    digitalWrite(Pin8, LOW);
    digitalWrite(Pin9, LOW);
    digitalWrite(Pin10, LOW);
    digitalWrite(Pin11, LOW);
    digitalWrite(Pin12, LOW);
    digitalWrite(Pin13, LOW);
    digitalWrite(Pin13, HIGH);  //Now Start Sequence from this point
    delay(Speed1);
    digitalWrite(Pin12, HIGH);
    delay(Speed1);
    digitalWrite(Pin11, HIGH);
    delay(Speed1);
    digitalWrite(Pin10, HIGH);
    delay(Speed1);
    digitalWrite(Pin9, HIGH);
    delay(Speed1);
    digitalWrite(Pin8, HIGH);
    delay(Speed1);
    digitalWrite(Pin7, HIGH);
    delay(Speed1);
    digitalWrite(Pin6, HIGH);
    delay(Speed1);
    digitalWrite(Pin5, HIGH);
    delay(Speed1);
    digitalWrite(Pin4, HIGH);
    delay(Speed1);
    digitalWrite(Pin3, HIGH);
    delay(Speed1);
    digitalWrite(Pin2, HIGH);
    delay(Speed1);
    digitalWrite(Pin1, HIGH);
    delay(Speed1);
    digitalWrite(Pin0, HIGH);
    delay(Speed1);
    digitalWrite(Pin13, LOW);
    delay(Speed1);
    digitalWrite(Pin12, LOW);
    delay(Speed1);
    digitalWrite(Pin11, LOW);
    delay(Speed1);
    digitalWrite(Pin10, LOW);
    delay(Speed1);
    digitalWrite(Pin9, LOW);
    delay(Speed1);
    digitalWrite(Pin8, LOW);
    delay(Speed1);
    digitalWrite(Pin7, LOW);
    delay(Speed1);
    digitalWrite(Pin6, LOW);
    delay(Speed1);
    digitalWrite(Pin5, LOW);
    delay(Speed1);
    digitalWrite(Pin4, LOW);
    delay(Speed1);
    digitalWrite(Pin3, LOW);
    delay(Speed1);
    digitalWrite(Pin2, LOW);
    delay(Speed1);
    digitalWrite(Pin1, LOW);
    delay(Speed1);
    digitalWrite(Pin0, LOW);
    delay(Speed2);
  }
  analogRead(Rblink2);
     while(Rblink2 > 50){
       digitalWrite(Pin0, LOW);   //Now Start R->L Lighting Sequence from this point. Fills LED Bar from Left to Right then Empties Left to Right
       digitalWrite(Pin1, LOW);
       digitalWrite(Pin2, LOW);
       digitalWrite(Pin3, LOW);
       digitalWrite(Pin4, LOW);
       digitalWrite(Pin5, LOW);
       digitalWrite(Pin6, LOW);
       digitalWrite(Pin7, LOW);
       digitalWrite(Pin8, LOW);
       digitalWrite(Pin9, LOW);
       digitalWrite(Pin10, LOW);
       digitalWrite(Pin11, LOW);
       digitalWrite(Pin12, LOW);
       digitalWrite(Pin13, LOW);
       digitalWrite(Pin0, HIGH);  
       delay(Speed1);
       digitalWrite(Pin1, HIGH);
       delay(Speed1);
       digitalWrite(Pin2, HIGH);
       delay(Speed1);
       digitalWrite(Pin3, HIGH);
       delay(Speed1);
       digitalWrite(Pin4, HIGH);
       delay(Speed1);
       digitalWrite(Pin5, HIGH);
       delay(Speed1);
       digitalWrite(Pin6, HIGH);
       delay(Speed1);
       digitalWrite(Pin7, HIGH);
       delay(Speed1);
       digitalWrite(Pin8, HIGH);
       delay(Speed1);
       digitalWrite(Pin9, HIGH);
       delay(Speed1);
       digitalWrite(Pin10, HIGH);
       delay(Speed1);
       digitalWrite(Pin11, HIGH);
       delay(Speed1);
       digitalWrite(Pin12, HIGH);
       delay(Speed1);
       digitalWrite(Pin13, HIGH);
       delay(Speed1);
       digitalWrite(Pin0, LOW);
       delay(Speed1);
       digitalWrite(Pin1, LOW);
       delay(Speed1);
       digitalWrite(Pin2, LOW);
       delay(Speed1);
       digitalWrite(Pin3, LOW);
       delay(Speed1);
       digitalWrite(Pin4, LOW);
       delay(Speed1);
       digitalWrite(Pin5, LOW);
       delay(Speed1);
       digitalWrite(Pin6, LOW);
       delay(Speed1);
       digitalWrite(Pin7, LOW);
       delay(Speed1);
       digitalWrite(Pin8, LOW);
       delay(Speed1);
       digitalWrite(Pin9, LOW);
       delay(Speed1);
       digitalWrite(Pin10, LOW);
       delay(Speed1);
       digitalWrite(Pin11, LOW);
       delay(Speed1);
       digitalWrite(Pin12, LOW);
       delay(Speed1);
       digitalWrite(Pin13, LOW);
       delay(Speed2);
     }
       
  analogRead(Brake3);
  while(Brake3 > 50){
    digitalWrite(Pin0, HIGH);
    digitalWrite(Pin1, HIGH);
    digitalWrite(Pin2, HIGH);
    digitalWrite(Pin3, HIGH);
    digitalWrite(Pin4, HIGH);
    digitalWrite(Pin5, HIGH);
    digitalWrite(Pin6, HIGH);
    digitalWrite(Pin7, HIGH);
    digitalWrite(Pin8, HIGH);
    digitalWrite(Pin9, HIGH);
    digitalWrite(Pin10, HIGH);
    digitalWrite(Pin11, HIGH);
    digitalWrite(Pin12, HIGH);
    digitalWrite(Pin13, HIGH);
  }
}

I did the same type of project for my first Arduino sketch

http://www.raymondandrews.com/zx-lights

You've got the delay for blinking of the lights in the turn signal code, so if you stomp on your brakes, they're not going to light until the turn signal routine is done.

You can shorten your code a lot by using arrays.