pulseIn and led

If the button makes the pin pulse LOW, shouldn't you be looking for a LOW pulse instead of a HIGH pulse?

What range of microseconds do you want to map to the PWM range (0-255). Maybe one 2.55 seconds? 2550000 microseconds? Note, there is a (default of) 1 second timeout on pulseIn(). Add a third argument if you want to allow more time.

   unsigned long pulse = pulseIn(button, LOW, 100000000UL);  // 100-second timeout
  analogWrite(outputPin, constrain(pulse/10000, 0, 255));