I'm no programming expert (Mech Engineer here), but you could do something like:
IF (pulseIn > 1000 & pulseIn < 2000)
map(1000, 2000, 1%, 99%)
ELSE IF ( pulseIn > 2000)
pwm = 100%
ELSE
pwm = 0%
Obviously my syntax is poor, but you get the idea.
I'm no programming expert (Mech Engineer here), but you could do something like:
IF (pulseIn > 1000 & pulseIn < 2000)
map(1000, 2000, 1%, 99%)
ELSE IF ( pulseIn > 2000)
pwm = 100%
ELSE
pwm = 0%
Obviously my syntax is poor, but you get the idea.