An error uploading the sketch

Dear Anyone who can help,
I’m trying to complete an arduino project, and have tried and tested it many many times. I have gotten it to work on an uno, but now I need it to work on a nano. However it refuses to upload to the nano. I have attached the code and the error message below. Thanks


#include <FastLED.h>
 
#define LED_PIN     8
#define NUM_LEDS    6
#define BRIGHTNESS  64
#define LED_TYPE    WS2812B
#define COLOR_ORDER GRB
CRGB leds[NUM_LEDS];
 
void setup() {
  FastLED.addLeds<LED_TYPE, LED_PIN, COLOR_ORDER>(leds, NUM_LEDS).setCorrection(TypicalLEDStrip);
  FastLED.setBrightness(BRIGHTNESS);
}
 
void loop() {
  // Change colors over time
  for(int i = 0; i < NUM_LEDS; i++) {
    leds[i] = Wheel(((i * 256 / NUM_LEDS) + millis() / 10) & 255);
  }
  FastLED.show();
  delay(20);
}
 
// Generate rainbow colors across 0-255 positions.
CRGB Wheel(byte WheelPos) {
  WheelPos = 255 - WheelPos;
  if(WheelPos < 85) {
    return CRGB(255 - WheelPos * 3, 0, WheelPos * 3);
  } else if(WheelPos < 170) {
    WheelPos -= 85;
    return CRGB(0, WheelPos * 3, 255 - WheelPos * 3);
  } else {
    WheelPos -= 170;
    return CRGB(WheelPos * 3, 255 - WheelPos * 3, 0);
  }
}

Arduino: 1.8.9 (Windows 10), Board: "Arduino Nano, ATmega328P"

Sketch uses 3702 bytes (12%) of program storage space. Maximum is 30720 bytes.

Global variables use 119 bytes (5%) of dynamic memory, leaving 1929 bytes for local variables. Maximum is 2048 bytes.

An error occurred while uploading the sketch

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x6a

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x6a

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x6a

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x6a

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x6a

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x6a

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x6a

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x6a

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x6a

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x6a

Problem uploading to board.

Welcome to the forum

Which Processor have you got selected in the IDE Tools menu ? Have you tried the "Old Bootloader" option ?

I just tried it, and unfortunately, still getting the error. I'm currently using ATmega328P. Thanks for the help

Which kind of Nano, FT232RL or CH340 chip as USB/serial transceiver?

Thanks for using code tags in your first post on the forum :+1:

There are three options under Tools → Processor; try all three of them.

Did you select the correct serial port? Does it disappear from the IDE when you disconnect the board?
Although your code does not indicate it, is there anything connected to pins 0 and 1?
Can you upload to the Nano if you disconnect the LED strip?

Please post a link to the board that you have. There are many different official Nanos (with different processors) as well as clones that might be advertised as Nanos but use a different processor.

Please (under File → Preferences)

  1. Enable Verbose output during upload.
  2. Disable Verbose output during compilation.
  3. Enable Verify code after upload.

Attempt an upload and post the results here (again using code tags as you did for the code).

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.