   targetCadence = 73;
   currentCadence = 25;
   writeCadence();
+  
+  runTests();
 }
 
 void loop(void)

  LcdString("            ");
  LcdString(curBuf);
  LcdString("            ");
  LcdString("            ");

}

/*Functions to handle buttons to increase or decrease target cadence.*/

  targetCadence--;
}

uint8_t setCurrent(uint8_t cadence){
  currentCadence = cadence;
  return currentCadence;
}

uint8_t setGear(uint8_t gear){
  if(gear < 1)
    gear = 0;
  if(gear > 8)
    gear = 8;
   gearPos = gear;
}

//Writes output to Serial, always returns true
int testWrite(void){
  writeCadence();
  return 0;
}

//Tests the setCurrent function
int testCurrentAdjust(){
  setCurrent(124);
  if(currentCadence == 124)
    return 0;
  else
    return 1;
}

int testSetGear(){
  setGear(5);
  if(gearPos == 5)
    return 0;
  else
    return 1;
}

int testSetGearTooHigh(){
  setGear(200);
  if(gearPos == 8)
    return 0;
  else
    return 1;
}

//Tests return 0 if pass, 1 if fail
//This should definitley be restructured to use function pointers and iteration, but is used now in interest of time.
void runTests(void){
  Serial.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  Serial.println("TEST: testWrite");
  Serial.println("OUTPUT:");
  if(!testWrite()){
    Serial.println("PASSED");
  } else {
    Serial.println("FAILED");
  }
  Serial.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  Serial.println();
  
  Serial.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  Serial.println("TEST: testCurrentAdjust");
  Serial.println("OUTPUT:");
  if(!testCurrentAdjust()){
    Serial.println("PASSED");
  } else {
    Serial.println("FAILED");
  }
  Serial.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  Serial.println();
  
  Serial.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  Serial.println("TEST: testSetGear");
  Serial.println("OUTPUT:");
  if(!testSetGear()){
    Serial.println("PASSED");
  } else {
    Serial.println("FAILED");
  }
  Serial.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  Serial.println();
  
  Serial.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  Serial.println("TEST: testSetGearTooHigh");
  Serial.println("OUTPUT:");
  if(!testSetGearTooHigh()){
    Serial.println("PASSED");
  } else {
    Serial.println("FAILED");
  }
  Serial.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  Serial.println();
}

void setup(void)
{
  Serial.begin(9600);
  //Setup Buttons
  //Enable internal pullup. 
  //These will be changed to the button pins when connected to the board, curretnly represents redboard buttons
