PH reader with dose pump PH control

alo alo everyone im trying to build this system but im struggling to link up the code that works with my board and lcd keypad shiel, almost all code that ive found has LED code and i have to switch out code i found for my shield from another page and swap out some of the names for values being printed ill post the code ive been working with bellow, ive tried to incorporate it to the code above to no avail. pls will someone with some experience help me get this to work

im using ph sensor controller V2.0
arduino uno
lcd keypad shield D1
with 2 6v dose pumps

/*

This sample code is used to test the pH meter V1.0.

Editor : YouYou

Ver : 1.0

Product: analog pH meter

SKU : SEN0161

*/

#define SensorPin A1 //pH meter Analog output to Arduino Analog Input 1
#define Offset -1.75 //deviation compensate
#define LED 13
#define LED 13
#include <LiquidCrystal.h>
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
#define samplingInterval 20
#define printInterval 800
#define ArrayLenth 40 //times of collection
int pHArray[ArrayLenth]; //Store the average value of the sensor feedback
int pHArrayIndex=0;
void setup(void)
{

pinMode(LED,OUTPUT);

lcd.begin(16, 2);
lcd.println("pH meter");
Serial.begin(9600);
Serial.println("pH meter"); //Test the serial monitor
}
void loop(void)
{
static unsigned long samplingTime = millis();
static unsigned long printTime = millis();
static float pHValue,voltage;
if(millis()-samplingTime > samplingInterval)
{
pHArray[pHArrayIndex++]=analogRead(SensorPin);
if(pHArrayIndex==ArrayLenth)pHArrayIndex=0;
voltage = avergearray(pHArray, ArrayLenth)5.0/1024;
pHValue = 3.5
voltage+Offset;
samplingTime=millis();
}
if(millis() - printTime > printInterval) //Every 800 milliseconds, print a numerical, convert the state of the LED indicator
{
lcd.print("Voltage:");
lcd.print(voltage,2);
lcd.print(" pH value: ");
lcd.println(pHValue,2);
digitalWrite(LED,digitalRead(LED)^1);
printTime=millis();
}
}
double avergearray(int* arr, int number){
int i;
int max,min;
double avg;
long amount=0;
if(number<=0){
lcd.println("Error number for the array to avraging!/n");
return 0;
}
if(number<5){ //less than 5, calculated directly statistics
for(i=0;i<number;i++){
amount+=arr;
}
avg = amount/number;
return avg;
}else{
if(arr[0]<arr[1]){
min = arr[0];max=arr[1];
}
else{
min=arr[1];max=arr[0];
}
for(i=2;i<number;i++){
if(arr<min){
amount+=min; //arr<min
min=arr;
}else {
if(arr>max){
amount+=max; //arr>max
max=arr;
}else{
amount+=arr; //min<=arr<=max
}
}//if
}//for
avg = (double)amount/(number-2);
}//if
return avg;
}

this is the closest weve gotten to having a reading on the lcd with a ph and voltage output

please help

For informed help, please read and follow the directions in the "How to use this forum" post. Please add code tags to your original post.