Sketch not loading to board

Hi,

Actually, I am encountering some problems with uploading my code to the board. The code doesn't actually have any problems as when I verify it, it works; however, when I actually try to upload the code, I get the following error:

avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
An error occurred while uploading the sketch

Could you please tell me what this error means and how to fix it?

Thanks!

What operating system are you using?

Have you selected the correct board and port from the Tools menu?

the code doesn't actually have any problems as when I verify it, it works

Note that verify means that it compiles, not necessarily that it works :slight_smile: .