       gval = gval + 1;
     }
     
-    if (rgo == 2){                                  // checks for descent stage bit, subtracts one from brightness
+    if (ggo == 2){                                  // checks for descent stage bit, subtracts one from brightness
       gval = gval - 1;
     }
     

// example for more information on possible values.
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);

int potVal = 9;                                     // integer to store the value from the potentiometer
int potPin = 2;                                     // integer to store the potentiometer pin
int butpin = 3;                                     // integer to store button pin
int butval;                                         // Button digital read variable
int butsel = 1;                                     // Button mode selection variable.
int butbounce;
int rcount;                                         // Counter for red
int gcount;                                         // Counter for green
int bcount;                                         // Counter for blue

}

void colourfade(){                                  //-----------------------------------------------(Colour Fade Function)

    long newPosition = myEnc.read();
    if (newPosition != oldPosition) {
        oldPosition = newPosition;
        Serial.println(newPosition);
    }
    if (newPosition > 255){
      myEnc.write(1);
    }
    if (newPosition < 1){
      myEnc.write(255);
    }
    
    magicnumber = random(0,30);                     //creates a magic number

