LED chaser problem

Hello!
I'm trying to make a LED chaser with five LEDs and a button to change between the different patterns. The problem is that if I want to change the pattern I have to hold the button pressed until the pattern finnishes. If I don't nothing changes. I've searched in google and in this forum and I haven't found anything to fix my problem.
This is my circuit:

and this is my code

int pinOne      = 0;
int pinTwo      = 2;
int pinThree    = 4;
int pinFour     = 6;
int pinFive     = 8;

int buttonPin   = 11;
int buttonState = 0;

int blinkMode   = 0;

void setup()
{
  pinMode(pinOne, OUTPUT);
  pinMode(pinTwo, OUTPUT);
  pinMode(pinThree, OUTPUT);
  pinMode(pinFour, OUTPUT);
  pinMode(pinFive, OUTPUT);
  pinMode(buttonPin, INPUT);
}

void loop()
{
  while(blinkMode == 0)
  {
    digitalWrite(pinOne, HIGH);
    delay(250);
    digitalWrite(pinOne, LOW);
    digitalWrite(pinTwo, HIGH);
    delay(250);
    digitalWrite(pinTwo, LOW);
    digitalWrite(pinThree, HIGH);
    delay(250);
    digitalWrite(pinThree, LOW);
    digitalWrite(pinFour, HIGH);
    delay(250);
    digitalWrite(pinFour, LOW);
    digitalWrite(pinFive, HIGH);
    delay(250);
    digitalWrite(pinFive, LOW);
    buttonState = digitalRead(buttonPin);
  if(buttonState == HIGH)
  {
    if(blinkMode == 1)
    {
    blinkMode = 0;
    }
    else 
    {
    blinkMode++;
    }
  }
  }
  while(blinkMode == 1)
  {
    digitalWrite(pinOne, HIGH);
    digitalWrite(pinTwo, HIGH);
    digitalWrite(pinThree, HIGH);
    digitalWrite(pinFour, HIGH);
    digitalWrite(pinFive, HIGH);
    delay(250);
    digitalWrite(pinOne, LOW);
    digitalWrite(pinTwo, LOW);
    digitalWrite(pinThree, LOW);
    digitalWrite(pinFour, LOW);
    digitalWrite(pinFive, LOW);
    delay(250);
      buttonState = digitalRead(buttonPin);
  if(buttonState == HIGH)
  {
    if(blinkMode == 1)
    {
    blinkMode = 0;
    }
    else
    {
    blinkMode++;
    }
  }
  }
}

Sorry for my English :frowning:
Thanks in advance

The easiest way might be to get a latching PTM

I think the problem is in my code. I've searched again and found that I can fix this with attachInterrupt(). I've read this http://arduino.cc/it/Reference/AttachInterrupt and other information about interrupts but I don't know how to put this in my code. I'll be thankful if someone can put it for me or if this won't work how to fix it.

Your biggest problem is that you have no resistors in line with those LEDs, this is damaging your arduino.

The next problem is the way you have written the software. Do not use the delay() function. Look at the blink without delay example for how to use the millis() counter to do what you want.

I've put 220 ohm resistor to each LED and changed the code. Everything works perfectly. Thank you a lot.