 //loop runs continually until the power runs out (or is swtiched off)
 void loop() {  
   
-  
-  for (int i = 0; i < 255; i++) {
-     led[0][0].set_brightness(i);
-     delay(10);
-  }
-  
-  for (int i = 255; i > 0; i--) {
-     led[0][0].set_brightness(i);
-     delay(10);
+  if (digitalRead(SWITCH_PIN) == LOW) {
+    brightness = brightness + brightChange;
+    led[0][0].set_brightness(brightness);
+    delay(10);
+  } else {
+    delay(10);
   }
   
 }

#include "LED.h"
#define LED_ARRAYS 4
#define LED_LOOPS_PER_ARRAY 3

/* Written by Owen Holloway [owen.holloway101@gmail.com]
 * on behalf of Suzanne Crowley

  for (int iterate_a = 0; iterate_a < LED_ARRAYS; iterate_a++) {
    
    for (int iterate_b = 0; iterate_b < LED_LOOPS_PER_ARRAY; iterate_b++) {
      //defines the variables in the array led, each to a new LED instance. 
      led[iterate_a][iterate_b] = *new LED();
      
    }
