Flashy Brake Lights on Motorcycle

I have been combing through the forum and just can't figure this out so I figure it's time to ask for help.
But first I'll read: http://forum.arduino.cc/index.php/topic,148850.0.html**How to use this Forum**

I am an Arduino Noob with some decent basic electronics knowledge. Yet, the functions and controls on the Arduino Nano elude me.
I am trying to build a long sequence of zig zag (flashing individually back and forth) LEDs with 6 jumbo (5mm) LEDs in a row. All my Leds have their own resistor before they are tied together going to Motorcycle ground. After the initial"zig zag" they all flash more and more steadily on until on solid. I have a long sequence that has been truncated for the purpose of posting this and troubleshooting. One issue is I only want this to continue the sequence IF the brake light is on. For example if I only tap the brakes it will only do some Zig-Zag.

Should I use the IF - ELSE combo to do this? Should I attach my Motorcycle brake light to the Analong input? I can't quite get the threshhold thing to work. Is there a better way to do it? Should I do a Voltage divider to bring the Brake light signal in on a digital input line?

 /*
Flashing Brake light that is actuated by the Motorcycle's Brake Light
*/
// This constant won't change:
const int threshold = 1000;   // an arbitrary threshold level that's in the range of the analog input

int analogPin = A7;
int aled = 7;
int bled = 8;
int cled = 9;
int dled = 10;
int eled = 11;
int fled = 12;

void setup() {
  // initialize the LED pin as an output:

  pinMode(aled, OUTPUT); 
  pinMode(bled, OUTPUT);   
  pinMode(cled, OUTPUT);  
  pinMode(dled, OUTPUT);   
  pinMode(eled, OUTPUT);  
  pinMode(fled, OUTPUT);   
  // initialize serial communications:
  Serial.begin(9600);
}

 void loop() {
  int analogValue = analogRead(analogPin);

    // if the analog value is high enough, turn on the LED:
  if (analogValue > threshold) {

// Here I will have long sequence of zig zag Lights then all flash more steadily on until on steady.
// The long seqence above has been truncated for the purpose of posting this and troubleshooting. 
// Keep in mind though that I only want this to continue the sequence IF the brake light is on.
// For example if I only tap the breaks it will only do some Zig-Zag.


  digitalWrite(aled, HIGH); 
  delay(75);                
  digitalWrite(aled, LOW);  
  delay(75); 
  
  digitalWrite(bled, HIGH); 
  delay(75); 
  digitalWrite(bled, LOW);
  delay(75); 

  digitalWrite(cled, HIGH); 
  delay(75);  
  digitalWrite(cled, LOW); 
  delay(75);  

  digitalWrite(dled, HIGH);
  delay(75);
  digitalWrite(dled, LOW); 
  delay(75); 

  digitalWrite(eled, HIGH);
  delay(75);
  digitalWrite(eled, LOW);
  delay(75); 

  digitalWrite(fled, HIGH);
  delay(75);
  digitalWrite(fled, LOW); 
  delay(75); 

  digitalWrite(eled, HIGH);
  delay(75);
  digitalWrite(eled, LOW); 
  delay(75);  

  digitalWrite(dled, HIGH);
  delay(75);
  digitalWrite(dled, LOW); 
  delay(75); 
 
// End of the flashy light example for this posting.

 } 
  else {
  digitalWrite(aled, LOW);  
  digitalWrite(bled, LOW); 
  digitalWrite(cled, LOW); 
  digitalWrite(dled, LOW); 
  digitalWrite(eled, LOW); 
  digitalWrite(fled, LOW);
  }

  // print the analog value:
  Serial.println(analogValue);
  delay(2);    // delay in between reads for stability
}

I'd..

Lemme think about this..

I'd write an object that could be turned on, turned off and given some idle time to do some work. (play with lights)

class zigzag {

public:
   zigzag();

   void setBrakes(boolean brakesOnOff);
   void idle(void); // All the work of turning lights on off goes here.

   int whereWeAreNow;
   boolean brakeState;
  // and other things to tell you what's going on.
};

//This reduces your main program to creating the object, keeping track of the brake switch and..
//Calling idle() every time through the loop.

zigzag blinker;       // I think this should create the object.. May need to use new & pointers.
boolean brakes = false;  // brakes are off..

void setup(void) { }

void loop(void) {

   boolean petal = getBrakeState();  // need to write this
   blinker.idle();   // Let blinker do the blink thing if it wants.
  if (brakes != petal) {
      blinker.setBrakes(petal);
      brakes = petal;
   }
}

Now you just need to fill in the blanks. Something to pass back weather the brakes are on or not and what to do with all your idle time now that you know what's going on.

hope this helps!

-jim lee