Cap doesn't really seen necessary. It looks like the problem is that you are dividing the value by 4, but that makes very small values. You should use the original knock code to see what values you get, and adjust the range because of that. For example, if your desired highest possible hit-strength only reads a 150 in the serial monitor, then instead of dividing by 4, you should use map(value, 0, 150, 0, 255).