Arduino pulsein blocking. Read the documentation.