Getting Galileo Gen 2 to recieve data from Mega

I am sending two integers from arduino mega via serial3 to Intel Galileo and I can get the intel to acknowledge that it has been sent some data but I cannot get it to properly read the data.

Here is the program that i have on the Galileo

// ***************************************************************************************
// Variables
// ***************************************************************************************

int delayTime = 200; // delay in milliseconds
int numOfWells = 11;
int wellPins = {13,2, 12,11,10,9,8, 3,4,5,6,7};
int inData;
byte input[5];
String inputString = β€œβ€;

// ***************************************************************************************

void setup()
{
Serial1.begin(9600);

pinMode(wellPins[0], OUTPUT);
pinMode(wellPins[1], OUTPUT);

for (int j = 2; j < 14; j++)
{
pinMode(wellPins[j], OUTPUT);
}

digitalWrite(wellPins[0], HIGH);
digitalWrite(wellPins[1], HIGH);

for (int j = 2; j < 14; j++)
{
digitalWrite(wellPins[j], LOW);
}

}

// ***************************************************************************************

void loop()
{

if (Serial1.available() < 0)
{
input[0] = Serial1.read();
numOfWells = input[0];
input[0] = Serial1.read();
delayTime = input[0];
}
//Serial1.flush();

cycle(numOfWells, delayTime);

}

And this is what is being sent from the Mega

if (tempInt <= 200 && tempInt > 0)
{
cycleDelay = tempInt;

Serial3.print(numOfWells);
Serial3.print(cycleDelay);

Serial.print(numOfWells);
Serial.print(cycleDelay);

screen.clrScr();
screen.setFont(BigFont);
screen.setBackColor(255,255,255);
screen.fillScr(255,255,255);
screen.setColor(255,0,0);
screen.print(β€œThe cycle has been changed to:”, 10, 25);
screen.print(tempInput, 50, 125);
delay(4000);

}
else
changeCycle();

}

Have you check the baudrate between the two board?

I set both of the baud rates to 9600 with

Serial1.begin(9600);
on the Galileo

and

Serial3.begin(9600);
on the Mega

I presume the code examples in serial input basics will work on the Galileo. They are simple and reliable.

...R