Unable to upload code to Arduino Mega2560

Good afternoon all,

I am new to this so apologies in advance if this is something quite simple. I have a Mega2560 and have in the past used it for lighting up LED strands (white Christmas lights).

I have decided to use RGB LED lights for 2018 and I tried the colour palette sketch from the library which worked fine. I was given a code to try as a simple trial to enable me to get used to the Arduino coding. I loaded the code and it appeared to work and then the second time it only lit up 10 of the 50 RGB nodes sequentially and they then started to flicker.

I have subsequently tried load various sketch codes which have worked previously and I keep having the same error message appear: please see below.

I would appreciate any advice or guidance. Many thanks in advance. Mark

In file included from C:\Users\Mark\Documents\Arduino\libraries\FastLED\examples\ColorPalette\ColorPalette.ino:1:0:

C:\Users\Mark\Documents\Arduino\libraries\FastLED/FastLED.h:17:21: note: #pragma message: FastLED version 3.001.008

pragma message "FastLED version 3.001.008"


Archiving built core (caching) in: C:\Users\Mark\AppData\Local\Temp\arduino_cache_15809\core\core_arduino_avr_mega_cpu_atmega2560_86a18be8dbdae6a0ff5274a0bad78155.a Sketch uses 5372 bytes (2%) of program storage space. Maximum is 253952 bytes. Global variables use 302 bytes (3%) of dynamic memory, leaving 7890 bytes for local variables. Maximum is 8192 bytes.

avrdude: stk500v2_setparm(): failed to set parameter 0x9e avrdude: stk500v2_command(): unknown status 0xc8 avrdude: initialization failed, rc=-1 Double check connections and try again, or use -F to override this check.

avrdude: stk500v2_command(): unknown status 0x01 avrdude: stk500v2_disable(): failed to leave programming mode An error occurred while uploading the sketch