 #include "Codes.h"
 
 
-//digital pin layout
-#define OUTPUT_IR_A 4 //12 - 8
-#define OUTPUT_IR_B 5 //13 - 8
 #define OUTPUT_DISPLAY 2 //occupies pins [x, x+9]
-
-//buttons!
 #define INPUT_BANK A2
 #define INPUT_UP A1
 #define INPUT_DOWN A0
 #define CODE_DELAY 6
 
-//vars
-int bankNum = 0;
-int lastBank = 0;
-
-int currentCode = 0;
+//running vars
+int bankNum = 0; //current code bank (bar graph indicator)
+int lastBank = 0; //old button value (to detect DOWN press)
+int currentCode = 0; //current code to send (incremented every loop())
 
 void setup()
 {
-  //Serial.begin(9600);
-  
   //make all the pins outputs
   for(int i = 2; i < 14; i++)
   {

}


void sendCode(const IRCode* code)
{
  BurstPair* pairs = getCode(code);


void loop()
{
  //get button values
  //buttons take so long to analogRead(), no need to debounce
  int currentBank = readButton(INPUT_BANK);
  int currentUp = readButton(INPUT_UP);
  int currentDown = readButton(INPUT_DOWN);
  
  //switch bank when button is DOWN
  if(currentBank && (!lastBank))
  {
    bankNum++;
    bankNum = bankNum % 10; //wrap
    setDisplay(bankNum);
  }
  lastBank = currentBank;
  
  //perform action based on button press states
  if(currentUp && !currentDown)
  {
    
