toggle switch

hi everyone first thing iam not english native speaker so iam sorry for bad english i have a project that using input from other divice this input when active the input is ground when disactive the input has no electricity on it the problem is i need to active led for 5 second and stop when the input is active untill it off and on agin whin i use normal delay the led is active untill the input is off and start count i need to start count when the input is active

What is your background in C++ and electronics?

See this: