Simplified led flash code