Ayuda Arduino mega 2560+gpshield+sht15+wheater kit+wiflyshield

arduino mega 2560.
sensor de temperatura y humedad SHT15 sparfun SparkFun Humidity and Temperature Sensor Breakout - SHT15 - SEN-08257 - SparkFun Electronics
Gps-shield sparkfun SparkFun GPS Logger Shield - GPS-13750 - SparkFun Electronics
antena gps EM-406A GNSS Receiver - EM-506N5 - GPS-19629 - SparkFun Electronics
Weather Meters sparkfun Weather Meter Kit - SEN-15901 - SparkFun Electronics
wifly shield sparkfun SparkFun WiFly Shield - WRL-09954 - SparkFun Electronics

he logrado hacer funcionar cada dispositivo independientemente con los siguientes codigos que encontre en internet-

para sensor de temp y humedad SHT15 utilice el suigiente codigo programación - electrónica: Sensor de Temperatura y Humedad SHT15 usando Arduino : este codigo me logro funcionar intente con otros pero no obtuve resultados.

para el gps utilice el suigiente codigo, aqui si aclaro que todos los demas codigos que hay en internet no me funcionaron solo este y cuando corre no me da la informacion bien por que no hace salto a la siguiente linea, en este me gustaria me ayudaran.

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1166042147/

para hacer funcionar el anemometro y la veleta para la direccion del viento use el siguiente, aqui tuve un poco de probblemas con la veleta ya que no me daba bien los datos, pero logre corregirlo:

para el pluviómetro que trae el kit utilice el suigiente codigo estos dos codigos los tome de una respuesta del foro http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1240823668

por ultimo para el wifi shield lo levante con algunas librerias que hay en sparkfun, pero el codigo no me corre bien, solo en algunas ocaciones logre onfigurar la wifly:

SpiUartTerminal

con algunas modificaciones y copiando algunos codigos dentro de otros logre levantar el sensor de temperatura y humedad, anemometro, veleta y publiometro,: ya leo muy bien los datos, ahora quiero integrarle el gps y luego el wifly para sacar los datos por la red o por internet, pero aqui es donde ya no se como hacerlo, espero que me puedan ayudar.

aqui esta mi codigo modificado:

#define uint  unsigned int
#define ulong unsigned long

int gTempCmd  = 0b00000011;  //digital 10
int gHumidCmd = 0b00000101;  //digital 11

#define PIN_ANEMOMETER  20     // Digital 20
#define PIN_VANE        5      // Analog 5
#define PIN_RAIN_GAUGE  21     // digital 21

// How often we want to calculate wind speed or direction
#define MSECS_CALC_WIND_SPEED 5000
#define MSECS_CALC_WIND_DIR   5000

volatile int numRevsAnemometer = 0; // Incremented in the interrupt anemometro
ulong nextCalcSpeed;                // When we next calc the wind speed
ulong nextCalcDir;                  // When we next calc the direction
ulong time;                         // Millis() at each start of loop().

volatile int numClicksRainGauge = 0; // Incremented in the interrupt rain gauge
float x; // for calculate the rain quantity

int shiftIn(int dataPin, int clockPin, int numBits)
{
   int ret = 0;
   int i;

   for (i=0; i<numBits; ++i)
   {
      digitalWrite(clockPin, HIGH);
      delay(10);  // I don't know why I need this, but without it I don't get my 8 lsb of temp
      ret = ret*2 + digitalRead(dataPin);
      digitalWrite(clockPin, LOW);
   }

   return(ret);
}


#define NUMDIRS 8
ulong   adc[NUMDIRS] = {17, 37, 59, 102, 128, 158, 169, 201};

char *strVals[NUMDIRS] = {"W","NW","N","SW","NE","S","SE","E"};
byte dirOffset=0;

void sendCommandSHT(int command, int dataPin, int clockPin)
{
  int ack;

  pinMode(dataPin, OUTPUT);
  pinMode(clockPin, OUTPUT);
  digitalWrite(dataPin, HIGH);// protocolo para la transmision
  digitalWrite(clockPin, HIGH);
  digitalWrite(dataPin, LOW);
  digitalWrite(clockPin, LOW);
  digitalWrite(clockPin, HIGH);
  digitalWrite(dataPin, HIGH);
  digitalWrite(clockPin, LOW);
          
  shiftOut(dataPin, clockPin, MSBFIRST, command);

  // Verify we get the coorect ack
  digitalWrite(clockPin, HIGH);
  pinMode(dataPin, INPUT);
  ack = digitalRead(dataPin);
  if (ack != LOW)
    Serial.println("Ack Error 0");
  digitalWrite(clockPin, LOW);
  ack = digitalRead(dataPin);
  if (ack != HIGH)
     Serial.println("Ack Error 1");
}

void waitForResultSHT(int dataPin)
{
  int i;
  int ack;

  pinMode(dataPin, INPUT);

  for(i= 0; i < 100; ++i)
  {
    delay(10);
    ack = digitalRead(dataPin);

    if (ack == LOW)
      break;
  }

  if (ack == HIGH)
    Serial.println("Ack Error 2");
}

int getData16SHT(int dataPin, int clockPin)
{
  int val;

   pinMode(dataPin, INPUT);
  pinMode(clockPin, OUTPUT);
  val = shiftIn(dataPin, clockPin, 8);
  val *= 256;

  pinMode(dataPin, OUTPUT);
  digitalWrite(dataPin, HIGH);
  digitalWrite(dataPin, LOW);
  digitalWrite(clockPin, HIGH);
  digitalWrite(clockPin, LOW);
          
  pinMode(dataPin, INPUT);
  val |= shiftIn(dataPin, clockPin, 8);

  return val;
}

void skipCrcSHT(int dataPin, int clockPin)
{
  pinMode(dataPin, OUTPUT);
  pinMode(clockPin, OUTPUT);

  digitalWrite(dataPin, HIGH);
  digitalWrite(clockPin, HIGH);
  digitalWrite(clockPin, LOW);
}

void setup() {
   Serial.begin(9600);
   pinMode(PIN_ANEMOMETER, INPUT);
   digitalWrite(PIN_ANEMOMETER, HIGH);
   attachInterrupt(3, countAnemometer, FALLING);
   nextCalcSpeed = millis() + MSECS_CALC_WIND_SPEED;
   nextCalcDir   = millis() + MSECS_CALC_WIND_DIR;
   pinMode(PIN_RAIN_GAUGE, INPUT);
   digitalWrite(PIN_RAIN_GAUGE, HIGH);
   attachInterrupt(2, countRainGauge, FALLING);
}

void loop() {
   time = millis();

   if (time >= nextCalcSpeed) {
      calcWindSpeed();
      nextCalcSpeed = time + MSECS_CALC_WIND_SPEED;
   }
   if (time >= nextCalcDir) {
      calcWindDir();
      nextCalcDir = time + MSECS_CALC_WIND_DIR;
   }
   x = numClicksRainGauge*0.05588; // factor conversion as indicated in datasheet
   Serial.print(numClicksRainGauge); // number of contact closures
   Serial.print(" clicks, ");
   Serial.print(x); // quantity of rain in mm (litres per square meters)
   Serial.print(" mm (L/m2)\n");
   delay(1000);
   
   int theDataPin  = 10;
  int theClockPin = 11;
  int ack;


           int val;
           int temperatura;
           int humedad;
          
           sendCommandSHT(gTempCmd, theDataPin, theClockPin);
           waitForResultSHT(theDataPin);
           val = getData16SHT(theDataPin, theClockPin);
           skipCrcSHT(theDataPin, theClockPin);
           Serial.print("Temperatura:");
            temperatura = -40.1 + 0.01 * (float)val;
           Serial.print("  ");
           Serial.println(temperatura, DEC);       
                       
           sendCommandSHT(gHumidCmd, theDataPin, theClockPin);
           waitForResultSHT(theDataPin);
           val = getData16SHT(theDataPin, theClockPin);
           skipCrcSHT(theDataPin, theClockPin);
           Serial.print("humedad:");
           //Serial.print(val, HEX);
        
           humedad = -2.0468 + 0.0367 * val + -0.0000015955 * val * val;
           Serial.print("  ");
           Serial.println(humedad, DEC);
      
           delay(1000); 
}

void countAnemometer() {
   numRevsAnemometer++;
}


void countRainGauge() {
numClicksRainGauge++;
}


void calcWindDir() {
   int val;
   byte x, reading;

   val = analogRead(PIN_VANE);
   val >>=2;                        // Shift to 255 range
   reading = val;

   for (x=0; x<NUMDIRS; x++) {
      if (adc[x] >= reading)
         break;
   }
   //Serial.println(reading, DEC);
   x = (x + dirOffset) % 8;   // Adjust for orientation
   Serial.print("  Dir: ");
   Serial.println(strVals[x]);
}

void calcWindSpeed() {
   int x, iSpeed;
   long speed = 14920;
   speed *= numRevsAnemometer;
   speed /= MSECS_CALC_WIND_SPEED;
   iSpeed = speed;         // Need this for formatting below
   

   Serial.print("Wind speed (Km/H): ");
   x = ((iSpeed / 10)*1.609344);
   Serial.print(x);
   Serial.print('.');
   x = ((iSpeed % 10)*1.609344);
   Serial.print(x);

   numRevsAnemometer = 0; 
}