"avrdude: verification error, first mismatch at byte 0x0000" while uploading

would you mind pasting the code?
maybe there is some bug in the code...

did you try to burn a new bootloader on the broken uno?
you need another arduino, or a isp programmer.

what programmer do you have?