Serial monitor infinite output

Sounds like floating pin syndrome.

Enable the internal pull-up resistor on the pin.