Thanks for the documentation. Next time, use the autoformat in the IDE before copying. It adds beauty and clarity to the presentation of the code. Often misplaced curly brackets are quickly spotted.
You use Vcc in the schematics. I hope it is Vin, or the barrel jack.
Did You use the USB plug when You tested feeding 12 volt to the UNO? I have a fear that Vin, barrel jack should be disconnected before USB brings 5 volt to the board.
The 0.42 volt reading indicates something bad. Let's find out why.