Arduino IDE unable to see serial connection on OS X El Capitan
I ran into a similar problem years ago on an ATMega128 (before Arduino) and you just have to be aware of alternative functions for the port. In this case PD0 is Hardware Serial RX which is a receive pin. 

Here's some relatively older code based around the same idea:


  Yes, you can use the RX/TX pins as regular IO. Just don't call the Serial.begin() in your code, and make sure you call a pinMode() for them. 


from: http://www.societyofrobots.com/robotforum/index.php?PHPSESSID=b928292f91c78b57b5683484af0f635e&amp;topic=12396.msg93239#msg93239

Another interesting post, fourth post: http://www.nerdkits.com/forum/thread/536/ 
where they disable the serial functionality once the code begins, downside (a above) you will lose serial comms, so it depends on how much you need them. 

UCSR0B = 0;


I'm not sure how successful that would be in today's arduino, I know a lot (if not all) of the prior functionality is maintained, but I haven't used them in a long while. 

The pin should become active again as the bootloader will automatically reenable it upon reset (although I haven't personally tested it). It will just make debugging that little bit harder if you need to. 

As I mentioned in my comment, if you have another pin available to you, use that instead.