when uploading a code a second time or unplugging and plugging in nothing runs.

trying writing a code that displays direction of accelerometer on segment display however if i reupload the code to the board it stops working completely. the only way to get it to work correctly is by uploading a different code then uploading the initial code again.

Ah the invisible code conundrum...
Followed by the even less visible schematic.

Both would be very useful to anyone who wants to help you....