One way is to use a state variable. If it's FALSE, blink at a certain speed. If it's TRUE, blink at a different speed.
PSEUDO CODE
int pause = 250;
int stateTrack = 0;
int ledPin = 13;
void setup() {
pinMode(ledPin, OUTPUT);
}
void loop() {
for (int cnt = 0; cnt < 4; cnt++) { // each blink is counted as 2: on and off
if (!stateTrack) {
pause = 250;
} else {
pause = 500;
}
digitalWrite(ledPin, digitalRead(ledPin) == HIGH ? LOW : HIGH);
delay(pause);
}
stateTrack++;
if (stateTrack > 1) stateTrack = 0;
}
Of course you'd probably want to write this without using delay() ...