LCD printing along side serial plotter

I'm doing my final year project measurement of height, weight and calculating BMI using the height weight and printing the values in 20x4 display and along with that I'm measuring ECG in serial plotter, the problem is I'm unable to see the height weight values in lcd simultaneous while monitoring the ECG in serial plotter. and the BMI is not able to be calculated please help me with the correction of code , I'm nearing the final dates for the project submission

bmi_TEST_load_height_lcd.ino (2.06 KB)

ecg_test2.ino (373 Bytes)

This code will send output to Serial Plotter and lcd simultaneously. It will have to be adapted to your setup.

/*
 * Output to both Serial Plotter and lcd
 */
 
#include <Adafruit_GFX.h>
#include <Adafruit_ILI9341.h>
#include <Adafruit_STMPE610.h>

// Default values for Adafruit shield v2.
#define TFT_DC 9
#define TFT_CS 10

Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);

byte myValue = 0;
unsigned long LoopTimer = 0;
const int LoopTime = 50;
char lcdMsg[10];  
   
void setup() {
  Serial.begin(9600);
  tft.begin();
  tft.setRotation(3);
  tft.fillScreen(ILI9341_BLACK);
  tft.setTextSize(2);
}

void loop() {
 if (millis() >= LoopTimer){
 LoopTimer += LoopTime;
 myValue += 8;
 // Serial Plotter
 Serial.println(myValue);
 // LCD
 tft.setCursor( 20,150);
 sprintf( lcdMsg, "%6u", millis());
 tft.setTextColor(ILI9341_YELLOW, ILI9341_BLACK);
 tft.print(lcdMsg);
 }
}