Today you can buy flashing LEDs; a simple two-lead component ... for all the world like any other LED, though embedded in the plastic dome is an integrated circuit to do all that flashing work.