You can modify code according to your needs , for example when I press button flashlight is on for a second