A question about timing.

This is sort of a classic problem, basically there are two things we want going on simultaneously, and both have delays in them, which then interfere with each other. I assume you are familiar with the "Blink" example? (In the Arduino IDE, File > Examples > Basics > Blink)

Also check out Examples > Digital > BlinkWithoutDelay ... this blinks an LED exactly like the "Blink" sketch, but uses a very different mechanism that doesn't employ the delay() function. Understand that concept and I think you will be able to apply it to your sketch.