'Wheel' was not declared in this scope

I am rather new in the C++ and I dont really know whats wrong with my code. I used the Neopixel strandtest as example.

#include <SoftwareSerial.h> //This part is irrelevant at the moment as it doesnt have any functions yet.
SoftwareSerial BT(0,1)

#include <Adafruit_NeoPixel.h>
#define PIN_POWER_SW 10
#define PIN_MOUSEPAD 9
#define PIN_EXTERNAL 7
#define PIN_INTERNAL 6
#define PIN_SWITCH_1 4
#define PIN_SWITCH_2 2

Adafruit_NeoPixel strip_internal = Adafruit_NeoPixel(14, PIN_INTERNAL, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel strip_mousepad = Adafruit_NeoPixel(55, PIN_MOUSEPAD, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel strip_external = Adafruit_NeoPixel(1, PIN_EXTERNAL, NEO_GRB + NEO_KHZ800);

void setup() {
  
  strip_internal.begin();
  strip_internal.show();
  strip_mousepad.begin();
  strip_mousepad.show();
  strip_external.begin();
  strip_external.show();
}

void loop() {
  rainbowCycle(20);
}
void rainbowCycle(uint8_t wait) {
  uint16_t i, j;

  for(j=0; j<256*5; j++) {
    for(i=0; i< strip_internal.numPixels(); i++) {
      strip_internal.setPixelColor(i, Wheel(((i * 256 / strip_internal.numPixels()) + j) & 255));
    }
    for(i=0; i< strip_mousepad.numPixels(); i++) {
      strip_mousepad.setPixelColor(i, Wheel(((i * 256 / strip_mousepad.numPixels()) + j) & 255));
    }
    for(i=0; i< strip_external.numPixels(); i++) {
      strip_external.setPixelColor(i, Wheel(((i * 256 / strip_external.numPixels()) + j) & 255));
    }
  }
}

    strip_internal.show();
    strip_mousepad.show();
    strip_external.show();
    delay(wait);
    }
  }

uint32_t Wheel(byte WheelPos) {
  WheelPos = 255 - WheelPos;
  if(WheelPos < 85) {
   return strip_internal.Color(255 - WheelPos * 3, 0, WheelPos * 3);
   return strip_mousepad.Color(255 - WheelPos * 3, 0, WheelPos * 3);
   return strip_external.Color(255 - WheelPos * 3, 0, WheelPos * 3);
  } else if(WheelPos < 170) {
    WheelPos -= 85;
   return strip_internal.Color(0, WheelPos * 3, 255 - WheelPos * 3);
   return strip_mousepad.Color(0, WheelPos * 3, 255 - WheelPos * 3);
   return strip_external.Color(0, WheelPos * 3, 255 - WheelPos * 3);
  } else {
   WheelPos -= 170;
   return strip_internal.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
   return strip_mousepad.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
   return strip_external.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
  }
}

}

It would be a big help if you post the entire error message(s). They would have more clues about the problem(s).

This code is outside of any function and the extra curly brackets aren't helping. I think this causes the wheel function definition to not be in the right place.

strip_internal.show();
strip_mousepad.show();
strip_external.show();
delay(wait);
}
}

In the IDE place the cursor to the right of a bracket and the matching bracket will be highlighted. Auto format (ctrl-t) would help, too.

Just a side note: why are you planning to use software serial on the hardware serial pins?

Ctrl+T to format your code with sensible indentations.

This makes bracket problems very easy to spot.

And yeah, what sterretje said. I can think of very few use cases where that is appropriate.

SoftwareSerial BT(0,1)

This does not make sense. If you are not using the hardware serial pins for talking to the PC, then use them for talking to the BT device, using Serial.

If you are using the the hardware serial pins for talking to the PC, then you can NOT use them to talk to the BT device.

Where does your rainbowCycle() function end? Why do you have code after that that is not in a function?