I have compiled and flashed (successfully) following program to the atmega328P (connected to a raspberry pi, MOSI-MISO-....).
This program reads a voltage on pin A0
I don't know or use the Pi
Your serial terminal will display the reading as you have set it up above so you will have to get that serial output read by the Pi