 char DisplayValueLUH[4];
 char DisplayValueSWR[6];
 char input; //buffer for input characters for calculations
-// char dataPrintout[10];
-
-// float tuningFreqCalc = 0;   // float for value C calculation
-// float KHz;                  // KHz constant
-// float PlanckTime;           // Planck constant
-// float pi;                   // π constant
-// float valueC1 = 0;           // calculated value C float
-// float valueCEffective = 0;  // calculated value C float
-// float valueL = 0;           // calculated value L float
-// float valueC1Corr = 0;      // calculated value C1 float
-// float valueC2Corr = 0;      // calculated value C1 float
-// float valueLcorr = 0;       // calculated value L float
-// float Cmult;                // constant multiplier to calculate C value
-// float Lmult;                // constant multiplier to calculate L value
+
 float valueRotateC1 = -1;
 float valueRotateC2 = -1;
 float valueRotateL = -1;

  ErasDisplayValueC2pF();
}


//void displayC2() {                                       // display C2 steps values
//  dtostrf(valueRotateC2, 5, 0, DisplayValueC2);
//  if (isBusy) {
//    TFTscreen.stroke(255, 255, 0);
//  } else {
//    TFTscreen.stroke(0, 255, 0);
//  }
//  TFTscreen.setTextSize(2);
//  TFTscreen.text(DisplayValueC2, 40, 85);
//}

//void EraseDisplayC2() {                                   // erase display C2 steps values
//  TFTscreen.stroke(0, 20, 20);
//  TFTscreen.setTextSize(2);
//  TFTscreen.text(DisplayValueC2, 40, 85);
//}

//void eraseFrequency() {                         // when * pressed - erases entered frequency bottom of the screen
//  EnteredFreqString = "";
//  TuningFreqString = "";
//  TFTscreen.stroke(0, 20, 30);
//  TFTscreen.setTextSize(2);
//  TFTscreen.text(enteredFreq, 50, 110);
//}

//void tuningDisplay() {
//  for (i = 0; i < 4; i++) {
//    TFTscreen.stroke(255, 255, 0);
//    TFTscreen.setTextSize(1);
//    TFTscreen.text("TUNING", 50, 45);
//    delay(1000);
//    TFTscreen.stroke(0, 20, 30);
//    TFTscreen.text("TUNING", 50, 45);
//    delay(500);
//  }
//}

//void calculateC() {                             // Calculate value C from entered frequency: C = 299792458 / (tuningFreq * 1000)
//  Serial.println(tuningFreq);
//  tuningFreqCalc = atof(tuningFreq);  // convert Freq input character array to a float
//  KHz = 1000;
//  PlanckTime = 299792458;
//  Cmult = 1.5;
//  valueCEffective = PlanckTime / ( tuningFreqCalc * KHz ) * Cmult;
//  valueC1 = valueCEffective + valueC1Corr;
//  Serial.print("Value C1 pF=");
//  Serial.println(valueC1);
//}

//void calculateL () {                            // Calculate "L" value from formula L=((1/(2*π*f*C))/(2*π*f))*1000000000000 (where f in KHz and C in pF)
//  pi = 3.14159;
//  Lmult = 1000000000000;
//  valueL = ((1 / (2 * pi * tuningFreqCalc * (valueCEffective))) / (2 * pi * tuningFreqCalc)) * Lmult + valueLcorr;
//  Serial.print("Value L uH=");
//  Serial.println(valueL);
//}

//void calculateStepsC() {                        // calculate needed steps for C
// Process for linear capacitor with 44-408 pF - need to ajust or change for different capacitor
//  float totalStepsC = 2964;
//  float pFmin = 20;
//  float pFmax = 200;
// float pFtotalValue = pFmax - pFmin;
//  Serial.println(pFtotalValue);
//  float pFperStep = pFtotalValue / ( totalStepsC / 2 );
//  Serial.println(pFperStep);
//  valueRotateC1 = ( valueC1 - pFmin ) / pFperStep;
//  Serial.print("steps C to rotate=");
//  Serial.println(valueRotateC1);
//}

//void CmoveStage1() {                            // Send commandn to move motor C
//  send syntax '2,valueRotateC;' to Nano
//}

//void calculateStepsL() {                        // calculate needed steps for L
// Process for non-linear variable inductor - need to ajust or change for different inductor
// y = -0.0299x2 + 1.3867x + 0.5894
// float totalStepsL = 2964;                                                              // total motor steps for 1 rotation
// float LturnsRequred = ( -0.0299 * valueL * valueL ) + ( 1.3867 * valueL ) + 0.5894;    // poly math
// valueRotateL = LturnsRequred * totalStepsL;
// Serial.print("L turns requred=");
// Serial.println(LturnsRequred);
// Serial.print("steps L to rotate=");
// Serial.println(valueRotateL);
//}

//void LmoveStage1() {                            // Send commandn to move motor L
//  send syntax '1,valueRotateL;' to Nano
//}


void sendStatusRequest() {
  static const unsigned long REFRESH_INTERVAL = 100; // ms
  static unsigned long lastRefreshTime = 0;

  keypad.addEventListener(keypadEvent);             //add an event listener for this keypad
}


void incL(float diff) {                             // rotate motor L with number of steps
  mechSetPosition(round (diff), 0, 0);
