attachInterrupt

Pin 7 is not an interrupt pin. The first item in the attachInterrupt() call is an interrupt number and not a pin number. See the linked image for details. You may also need to set the interrupt pin as an input.