 		analogWrite(CFG::GPIN, color.g);
 		analogWrite(CFG::BPIN, color.b);
 	}
-
+	Timer btnTimer;//used for debouncing
+	void btn_tick() {//handles button input
+		if(!btnTimer.Every(20))//only run every 20ms
+			return;
+		//get states from pins
+		buttons[0] = !digitalRead(CFG::BTN1);//invert so that high is false and low is true
+		buttons[1] = !digitalRead(CFG::BTN2);
+		//button logic
+		//TODO add overriding logic here for callbacks 
+		if (buttons[0] > buttonsOld[0]) {//if button 1 has gone from up to down
+			nextMode();
+		} 
+		if (buttons[1] > buttonsOld[1]) {//if button 2 has gone from up to down
+			//add dimming here
+		} 
+		//update old states
+		buttonsOld[0] = buttons[0];
+		buttonsOld[1] = buttons[1];
+	}
+	void nextMode() {
+		uint8_t len = sizeof(CFG::modelist)/sizeof(Mode*);//get length
+		if (++currentMode == len) //check for out of bounds and reset if needed
+			currentMode = 0;
+		activeMode = CFG::modelist[currentMode];//set activeMode to the next mode in the list
+		//animT.Reset();//make the animation start over
+	}
 }
 
 void setup() {

	}
	RGB pattern2[] = {blue, blue, red};
	Mode mode2(callback2, pattern2);//passing the function instead of a color list as the 1st arg


	//add modes to the mode list
	Mode *modelist[] = {&mode1};
	
//**OTHER SETTINGS**//
	void modeSetup() {


void loop() {
	Moody::anim_tick();
	Moody::btn_tick();
}