avrdude: stk500_recv() error on standalone arduino

I can’t upload a program which uses digitalRead, analogRead, and Serial.print on my standalone arduino, because I get this error:

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xbf

However, I have no trouble uploading the blink program to it, which only uses digitalWrite, so it has to do something with the methods mentioned at the start of this post.

You can see the diagram below.

Standalone_atmega328 (1).pdf (107 KB)

That's BS ;) This is an uploading problem, not a compiler issue. So no matter the program, you will have trouble.

Did you burn the bootloader? Of do you use a programmer?

OR, and that still makes it a program error, did you connect other stuff to it now?

And about the schematic, disconnect AREF from Vcc. Connect it to a cap to GND. And now we're sprinkling caps, add one as close as possible to Vcc as well.

There is already a bootloader on the ATmega (which is why I can upload the blink program I think). I'm not sure how to explain why I can upload certain progams and not others