   else if(time == 50) {
     DELAY = 1;
   }
-  for(int i=0; i<looper; i++) {
+  for(int i=0; i<numb; i++) {
     for(int j=0; j<255; j++) {
-      if(j <= red) {
+      if(j <= R) {
         analogWrite(REDPIN, j);
       }
-      if(j <= gre) {
+      if(j <= G) {
         analogWrite(GREPIN, j);
       }
-      if(j <= blu) {
+      if(j <= B) {
         analogWrite(BLUPIN, j);
       }
+      if(j <= 55) {
+        delay(DELAY);
+      }
       delay(DELAY);
     }
     for(int k=255; k>=0; k--) {
-      if(k <= red) {
+      if(k <= R) {
         analogWrite(REDPIN, k);
       }
-      if(k <= gre) {
+      if(k <= G) {
         analogWrite(GREPIN, k);
       }
-      if(k <= blu) {
+      if(k <= B) {
         analogWrite(BLUPIN, k);
       }
       delay(DELAY);
     }
-  }
-}
-
-int HEXToRGB(char first, char second) {
-  int f = CharToHEX(first);
-  int s = CharToHEX(second);
-  return (f*16)+s;
-}
-
-int CharToHEX(char x) {
-  int y = 0;
-  if(x == '1') y = 1;
-  else if(x == '2') y = 2;
-  else if(x == '3') y = 3;
-  else if(x == '4') y = 4;
-  else if(x == '5') y = 5;
-  else if(x == '6') y = 6;
-  else if(x == '7') y = 7;
-  else if(x == '8') y = 8;
-  else if(x == '9') y = 9;
-  else if(x == 'a') y = 10;
-  else if(x == 'b') y = 11;
-  else if(x == 'c') y = 12;
-  else if(x == 'd') y = 13;
-  else if(x == 'e') y = 14;
-  else if(x == 'f') y = 15;
-  return y;
-}
+    delay(100);
+  }
+}
+
+// onRGB - turns on an RGB LED
+void onRGB() {
+  analogWrite(REDPIN, R);
+  analogWrite(GREPIN, G);
+  analogWrite(BLUPIN, B);
+}
+
+// offRGB - turns off an RGB LED
+void offRGB() {
+  analogWrite(REDPIN, 0);
+  analogWrite(GREPIN, 0);
+  analogWrite(BLUPIN, 0);
+}
+

  }
}

// pulse - pulse an RGB LED
// params:
//   looper: int - amount of times pulse the LED
//   time: int - time for the delay between on/off
//   red: int - red 
//   gre: int - green
//   blu: int - blue
void pulseRGB(int looper, int time, int red, int gre, int blu) {
  int DELAY = 1;
  if(time == 500) {
    DELAY = 8;

#include <SoftwareSerial.h>

// ATtiny settings: ATtiny85 @8MHz (internal oscillator; BOD disabled), burn bootloader

SoftwareSerial btSerial(3, 2); // TX, RX

// Global
int BUTT = 2;
int BUTT_STATE = 0;
int TIME_START = 0;
int REDPIN = 0;
