OK,
Again, with more than a little help, I’ve got it to compile, but, when I download it, I have no idea if the coms part is working, because, my LCD doesn’t work 
What’s stopping my LCD working, and, does it look like I should be able to read from my datalogger?
#include <LiquidCrystal_I2C.h>
//Declare LCD parameters
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
// Define message data
#define MAX_LEN 42
#define MAX_MESS 107
// Variables used to decode serial data from DL1
int buffer[MAX_LEN] = {0}; //Our Buffer
unsigned int bytesInBuffer = 0; //Keep track of bytes in Our Buffer
byte messageLengths[] = {9, 11, 0, 7, 21, 6, 6, 6, 5, 14, 10, 3, 0, 5, 5, 5, 5, 5, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 11, 6, 10, 10, 10, 11, 11, 11, 11, 11, 3, 5, 30, 11, 4, 4, 42, 42, 3, 5, 5, 5, 6, 24, 3, 6, 4, 4, 5, 5, 5, 5, 10, 5, 5, 5, 5, 6, 5, 4, 5, 6, 5, 10, 8, 0, 0, 0, 19, 0, 17, 9, 11, 0, 0};
int currentMessageLength = 0; //number of bytes in the current message
//int i; //generic, used for all for loops
int bytesNeededInBuffer; //Amount of bytes needed in buffer to complete message
byte calculatedCheckSum; //checksum calculated from bytes in message
int trash;
//Global Variables declared
int Front_Brake_Press_mV;
int Rear_Brake_Press_mV;
void setup(){ //Code that only runs once on power up
Serial.begin(115200); //Turn on serial port
} //end setip()
void loop() {
RunSerial(); //Run the serial function to check serial buffer for DL1 messages
// calculate brake pressue and bias, and display on 20x4 LCD
float Front_Brake_Bar = (62.5 * (Front_Brake_Press_mV/1000)) - 31.3; // 0bar = 0.5V and 350bar = 4.5V
float Rear_Brake_Bar = (62.5 * (Rear_Brake_Press_mV/1000)) - 31.3; // 0bar = 0.5V and 350bar = 4.5V
float Front_Bias = (1/((Front_Brake_Bar + Rear_Brake_Bar)/Front_Brake_Bar))*100; // calculate % front bias
float Rear_Bias = (1/((Front_Brake_Bar + Rear_Brake_Bar)/Rear_Brake_Bar))*100; // calculate % rear bias
lcd.clear();
lcd.print("Front Bar");
lcd.setCursor(0, 1);
lcd.print("Front Bias");
lcd.setCursor(0, 2);
lcd.print("Rear Bias");
lcd.setCursor(0, 3);
lcd.print("Rear bar");
lcd.setCursor(14, 0);
lcd.print(Front_Brake_Bar);
lcd.setCursor(14, 1);
lcd.print(Front_Bias);
lcd.setCursor(14, 2);
lcd.print(Rear_Bias);
lcd.setCursor(14, 3);
lcd.print(Rear_Brake_Bar);
delay(05);
} //End of main loop
//Start of function area
void RunSerial(void){
if (bytesInBuffer == 0){ //Check if our buffer is empty
if (Serial.available()>=1){ //Check if serial buffer is empty
buffer[0] = Serial.read(); //read first byte into our buffer
bytesInBuffer = 1; //Update buffer counter
}else{
goto endOfSerial;
}//end if to check if serial buffer is empty
}//end if to check if there are bytes in our buffer
if(buffer[0] > MAX_MESS){//check to see if 1st byte could be a message
moveBytesDown();
goto endOfSerial;
//Serial.println(2);
}//end check of message number check
currentMessageLength = messageLengths[(buffer[0]-1)]; //get message length from array
if(currentMessageLength == 0 ){//check to see if 1st byte could be a message
moveBytesDown();
goto endOfSerial;
//Serial.println(3);
}//end check of message number check
if (currentMessageLength > bytesInBuffer){ //check if we have enough bytes in our buffer
bytesNeededInBuffer = currentMessageLength-bytesInBuffer;
if (Serial.available()>=bytesNeededInBuffer){ //check if there are enough bytes in serial array
int bytesInBufferOld = bytesInBuffer;
for(int i=bytesInBufferOld; i < currentMessageLength; i++){ //for loop to add bytes to end of our array
buffer[i]= Serial.read();
bytesInBuffer=bytesInBuffer + 1;
}//end for loop
}else{
goto endOfSerial;
}
}
calculatedCheckSum = 0; //reset checksum
for (int i=0; i<(currentMessageLength-1); i++){ //for loop to sum checksum value
calculatedCheckSum = calculatedCheckSum + buffer[i];
}//end if checksum for loop
if (calculatedCheckSum == buffer[currentMessageLength-1]){ //if message has been proven
// Serial.print (buffer[0]);
// Serial.println();
if (buffer[0] == 20) {
int Front_Brake_Press_mV = decodeAnalogueInput(); // Analog 01 - Front brake pressure
}
if (buffer[0] == 21) {
int Rear_Brake_Press_mV = decodeAnalogueInput(); // Analog 02 - Rear brake pressure
}
//bytesInBuffer = 0;
for(int i = 0; i < currentMessageLength; i++){
moveBytesDown();
}
}else{
// for(int i = 0; i < currentMessageLength; i++){
moveBytesDown();
// }
}
endOfSerial:
if (Serial.available()>60){ //Check if serial buffer is full
while(Serial.available()>0) trash = Serial.read(); //if full, clear buffer to ensure full messages are recorded
// end of serial comm (DL-1)
}
}// End of RunSerial Function
/*
Analoge input
Channel Number 20-51
Total Length 4 bytes
Channel Data1 Data2 Checksum
Voltage [V]= (Data1 * 256 + Data2 )/1000
*/
unsigned long decodeAnalogueInput() {
unsigned long result = 0;
byte checksum = 0;
for (int k=0; k<3; k++) {
checksum += buffer[k];
}
if (checksum == buffer[3]) {
result = (buffer[1] * 256 + buffer[2]);
return result; //in mV
} else { // invalid checksum
return -1;
}
}
void moveBytesDown(void){
for (int i=0; i<=bytesInBuffer; i++){
buffer[i] = buffer[i+1];
}//end of for loop to move bytes down
bytesInBuffer=bytesInBuffer-1;
}