help: Arduino bike turn signal

I'm relatively new to the arduino language and i was wondering how I would flash the turn signal I'm building for my bike. Here's the code I've written as of now:

//Arrow pointing turn signal using buttons
int switchPin = 8;
int switchPin2 = 9;    //set all the integers
int ledPin = 13;
int ledPin2 =12;

void setup()
{
  pinMode(switchPin, INPUT);
  pinMode(switchPin2, INPUT);    //set the integers as inputs or outputs
  pinMode(ledPin, OUTPUT);
  pinMode(ledPin2, OUTPUT);
}

void loop()
{
  if (digitalRead(switchPin) == HIGH)    //configure the buttons to flash the led's
  {
    digitalWrite(ledPin, HIGH);         
   }
  else
  {
    digitalWrite(ledPin,LOW);
  }
  {
    if (digitalRead(switchPin2) == HIGH)
    {
      digitalWrite(ledPin2, HIGH);
    }
    else
    {
      digitalWrite(ledPin2, LOW);
    }}}

So far when I press the button the led's turn on and they do not flash, is there any way i could accomplish this?

Moderator edit: CODE TAGS, CODE TAGS, CODE TAGS

They are indeed flashing, just faster than your eye can perceive. You need to slow things down a bit (not with delays!).

See the BlinkWithoutDelay example in the Arduino Learning section. I think this will pretty much solve your problem.

i dont understand

Mystic_Monster7: i dont understand

Then ask questions.

Actually they won’t flash which is exactly what you have them programmed to do.

Your machine will have three states. Not doing anything, signalling left and signalling right. You sketch has to poll the switches (check them repeatedly) and decide which state it should be in. Even while signalling it will still have to poll the switches. This is where the blink without delay example (it came with the IDE) comes in.