Question about pulseIn

Thanks for responding.

I'll try to put a Serial.print (), but while I hold down the button, the LEDs are lit before you release it. I think it means that "PulseIn" time does not count.

I need to know which button or buttons pulse, yet know how long they are pressed to determine the operating ranges.

And I put the error function always as a precaution, in case the event occurred "else" and stay standing loop. Error is a function that turns on and then off the LED 13.

In the first post i attach the entire code .ino

Thank you very much.