Thank you all again for your help. I now have a fully working 'GPS to main board' program. It may not be very neat and I'm sure it's not 'good' programming, but it works!! If anyone else is struggling and comes across this thread then here is my final version. Which might even come out in little grey boxes!!
/////////MASTER////////
#include <Wire.h>
#include <SoftwareSerial.h>
int infofromNANO = 0;
int selectGPSinfo = 2; // 1 is Month, 2 is Hrs, 3 is Mins, 4 is secs
// This variable will be changed, as required,
// by the rest of the program.
void setup()
{
Serial.begin(9600);
Wire.begin ();
}
void loop()
{
Wire.beginTransmission(9);
Wire.write(selectGPSinfo); // send 1,2,3, or 4 to slave to get required variable
Wire.endTransmission();
Wire.requestFrom(9,1);
if (Wire.available())
{
infofromNANO = Wire.read(); // recieve GPS data from slave
Serial.println (infofromNANO);
}
}
//////////////SLAVE////////////
#include <SoftwareSerial.h>
#include <Wire.h>
int Month = 4; //These values will be read from the GPS
int Hrs = 23; // and then will be sent to master (UNO)
int Mins = 59;
int Secs = 45;
int infofromUNO = 0;
int sendGPS = 0;
void setup()
{
Wire.onReceive(receiveEvent); //receive data from master
Wire.onRequest(requestEvent); //master requests data from slave
Wire.begin(9);
Serial.begin(9600);
}
void receiveEvent(int quantity)
{
if (Wire.available()>0)
{
infofromUNO = Wire.read();
}
}
void requestEvent()
{
Wire.write(sendGPS); //GPS data sent to master when requested.
}
void loop()
{
Serial.println (infofromUNO);
if (infofromUNO == 1) sendGPS = Month;
if (infofromUNO == 2) sendGPS = Hrs;
if (infofromUNO == 3) sendGPS = Mins;
if (infofromUNO == 4) sendGPS = Secs;
}