I updated the code but still cannot upload to the board. It says:
avrdude: Version 6.0.1, compiled on Apr 15 2015 at 19:59:58
Copyright (c) 2000-2005 Brian Dean,
http://www.bdmicro.com/ Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"
Using Port : COM6
Using Programmer : stk500v1
Overriding Baud Rate : 19200
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x03
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x77
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x1a
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xfe
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xd1
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xff
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xd0
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xcf
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xf2
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x40
Error during upload using programmer
Upload failed
Upload failed
The uploader returned an error
avrdude done. Thank you.