the reason why i made this version of code was to
allow that loop back by making a jumper cable
A0 ↔ D5
so when you click on the [ D5 ] button the D5 output should change
( what you also can verify with a voltmeter )
and via that jumper cable the A0 input jump from
0 to 5V ( what you should see in the A0 bar graph and the volt number…
//__________________
if you think that your code has worked
but now still runs, but show allways 0
there might be a hardware / or port problem
of the arduino board. But i only see burned out Douts
( from a short circuit ) or arduinos what stopped working completely.
anyhow go back to
Arduino IDE, load a blinky and a analog read example and test with the
build in monitor.