Need help modifyin the code to use a vibration switch instead of an analog senso

Sorry. I thought in Reply #8 that the pattern was something the vibration sensor is intended to detect. But I think you mean that after it is triggered the Arduino should make a sequence of lights.

If that is the case then I think all you need is to use digitalRead() to detect the vibration sensor. But you will probably need to ignore further vibration inputs for certain length of time so that the sequence of lights does not restart before it finishes.

...R