 Button cancel_button = Button(BOXSIZE*3,200,BOXSIZE,BOXSIZE,ILI9341_LIGHTGREY,true,&tft);
 
 // Create settings page buttons
-Button ECGPlus = Button(30,70,18,18,ILI9341_BLACK,true,&tft);
-Button ECGMinus = Button(100,70,18,18,ILI9341_BLACK,true,&tft);
-Button ECGPlus1 = Button(180,70,18,18,ILI9341_BLACK,true,&tft);
-Button ECGMinus1 = Button(250,70,18,18,ILI9341_BLACK,true,&tft);
+
+/*for ECGMin value*/
+Button ECGPlus = Button(100,70,18,18,ILI9341_BLACK,true,&tft);
+Button ECGMinus = Button(30,70,18,18,ILI9341_BLACK,true,&tft);
+/*for ECGMax value*/
+Button ECGPlus1 = Button(250,70,18,18,ILI9341_BLACK,true,&tft);
+Button ECGMinus1 = Button(180,70,18,18,ILI9341_BLACK,true,&tft);
+
+
 Button SP02Plus = Button(30,120,18,18,ILI9341_WHITE,true,&tft);
 Button SP02Minus = Button(100,120,18,18,ILI9341_WHITE,true,&tft);
 Button SP02Plus1 = Button(180,120,18,18,ILI9341_WHITE,true,&tft);

    tft.printf("%d", DEFAULT_ECG_MIN + biasECGMin);
  }
  createVLabel(0, 55, ecgLabel, 2, ILI9341_GREEN);
  ECGPlus.draw();
  ECGMinus.draw();
  createHLabel(34, 72, "-", 2, ILI9341_WHITE);
  createHLabel(104, 72, "+", 2, ILI9341_WHITE);
  

int biasECGMin = 0;
int biasSP02Max = 0;
int biasSP02Min = 0;
int i = 0;

Adafruit_ILI9341 tft = Adafruit_ILI9341(CS_SCREEN, DC);
Adafruit_STMPE610 ts = Adafruit_STMPE610(CS_TOUCH);
