This would probably be more fitting for the electronics category instead of software. Also its best not to start multiple identical threads since you posted
this one yesterday. Soeren's suggestion of an astable multivibrator sounds like what you would need, but as he points out, we would need more information. The page I linked on the other thread to
555 timer circuits also includes schematics for an astable multivibrator.