Blink light and stop by sending command to Serial

This tutorial will help:

BlinkWithoutDelay