use of pins 0 and 1

You may wish to put print statements in your sketch to help debug it, as the serial data uses those pins you are best to avoid them for use in your circuit.