Direct Port Manipulation with PORTD ( 328p )

When you reset the Arduino, the port pins all default to inputs. So, your program can set any combination of input and output you need, without having to worry about bricking.

Unless you are using the serial monitor, you can also use D0 and D1 for general purpose I/O.