RPM LEDs code help.

Also am wanting to have a shift LED that will flash when the RPM gets to a pre set value via a rotary switch / hex switch.