Controlling LED light using a limit switch