[SOLVED] Wifly & LCD screen conflict

After you initialize the WiFly, you may need to patch your code a bit. The WiFly library code may not be willing to share the SPI bus, but you should be able to force it to share.

When you want to draw on the lcd, try this:

// disable the WiFly and enable the lcd
digitalWrite(10,HIGH);
digitalWrite(9,LOW);
// do your lcd draw
// then disable the lcd and enable the WiFly
digitalWrite(9,HIGH);
digitalWrite(10,LOW);

If the WiFly library functions handled the SS pin correctly, you would not need to disable and enable digital pin 10, just digital pin 9.

add: If that doesn't work, then you may need to disable interrupts during the lcd write

// disable interrupts and the WiFly and enable the lcd
noInterrupts();
digitalWrite(10,HIGH);
digitalWrite(9,LOW);
// do your lcd draw
// then disable the lcd and enable the WiFly and interrupts
digitalWrite(9,HIGH);
digitalWrite(10,LOW);
interrupts();

I don't know how stopping interrupts will affect your WiFly comm during the lcd write tho.