Programming Questions / Error code: (unable to upload code)

Hi there,

I'm relatively new to coding and am having some trouble uploading someone's code ([u]https://create.arduino.cc/projecthub/muhamd-magdy/arduino-game-by-lcd-9a3bc2[/u]) to my Arduino circuit.
When verifying the code, it shows no errors, however when uploaded to the Arduino mega.

I have set the circuit up correctly, using 2x16 LCD, x1 push button, x1 220ohm resistor, and an Arduino mega.
Will I also need to implement a potentiometer?

Nevertheless, the following text is the error message which is produced:

Arduino: 1.8.10 (Mac OS X), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

Sketch uses 4772 bytes (1%) of program storage space. Maximum is 253952 bytes.
Global variables use 175 bytes (2%) of dynamic memory, leaving 8017 bytes for local variables. Maximum is 8192 bytes.
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
An error occurred while uploading the sketch

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

If someone could provide me with any advice or guidance to getting this working it would be greatly appreciated.

Regards,

Logic101

Check that you have the correct COM port selected in the IDE then try uploading a simple sketch such as the Blink example. Does it work ?