Wifi.h and GSM.h clash?

Is there a clash between these 2 libraries??? i know that both the Wifi Shield and GSM shield uses PIN 7 for their respective uses. But i changed the Wifi Shield Pin7 to Pin 8 already. and it seems like the GSM shield just won't work.

Is there a clash between these 2 libraries???

Maybe... Since you haven't described which WiFi shield/library or which GSM shield/library, you've come to the wrong place for answers.

i know that both the Wifi Shield and GSM shield uses PIN 7 for their respective uses. But i changed the Wifi Shield Pin7 to Pin 8 already.

How? And what changes did you make to the library?

and it seems like the GSM shield just won't work.

It could be your code.

Why are you using both shields together?

hi PaulS, I am currently using the original Arduino WiFi Shield and the Arduino GSM/GPRS Shield. And I am using both of them to send data to a server . So when there is WiFi, the data will be sent via WiFi and when there is no WiFi, data will be sent via GPRS.

I made changes to the WIFI SHIELD Library . which is this file called , spi_drv.cpp which contains variables for the communication between Arduino and WiFi Shield. I changed variable with 7 in it to 8 . Which means WIFI shield will use Pin 8 for handshake instead of the traditional Pin 7. This will work if I didn't stack the GSM Shield on it. After I stack the GSM shield and combine the WiFi Shield codes with the GSM shield codes, problems arises.

Inside my void setup() I have a WHILE LOOP which waits for either GSM or GPRS to be ready.

while(notConnected)
{
if((gsmAccess.begin(PINNUMBER)==GSM_READY) &
(gprs.attachGPRS(GPRS_APN, GPRS_LOGIN, GPRS_PASSWORD)==GPRS_READY))
notConnected = false;
else
{
Serial.println("Not connected");
delay(1000);
}
}

This code above will not happen at all. It will enter the while loop but skip the IF ELSE STATEMENT.

if((gsmAccess.begin(PINNUMBER)==GSM_READY) &
        (gprs.attachGPRS(GPRS_APN, GPRS_LOGIN, GPRS_PASSWORD)==GPRS_READY))

Why is there a bitwise and in there (&) rather than a logical and (&&)?

Why is the variable called notConnected? It makes more sense to call the variable connected, and use

while(!connected)
{
   if(xxx)
   {
      connected = true;
   }
}
It will enter the while loop but skip the IF ELSE STATEMENT.

That is impossible.

However, you need to take your snippets to http://snippets-r-us.com.