Well 0 and 1 are used for serial data, so, you need to switch some pins around. Generally avoid using pins 0 and 1, but since you need all of your pins for whatever reason and we have no idea what they are, maybe there are some that won't be affected by the serial data.