Fade LED strip using proximity and map() function
The biggest problem is that by forcing the code to use integral inches you've restricted it to 31 discrete values. And since the brightness response of a PWMed LED is non-linear you effectively have very large steps in brightness when the LED is dim.

pulseIn() has much more flexibility with regards to its range so use the raw value directly instead of converting it to "pretty" values.

val = map(pulse, ..., ..., 0, 255);