if ( 14335 < val || val < 14535) {
Can be simplified to
if ( val != 14335) {
So you want the LED to be off at that value, and on otherwise? Seems a bit loft to expect it to be EXACTLY that value.
if ( 14335 < val || val < 14535) {
Can be simplified to
if ( val != 14335) {
So you want the LED to be off at that value, and on otherwise? Seems a bit loft to expect it to be EXACTLY that value.