Conflict library ?

Hi everybody!

I just bought some pieces to connect on my arduino mega 2560. An LCD 4x20, wifi shield and keypad 3x4.

And to use them I will need 3 main library :: LiquidCrystal.h - WiFi.h - Keypad.h (that I found on the playground)

I noticed when I include those 3.. the keypad library does not work normally but it works very good alone..

After some tries i think there is a conflict between the wifi library and the keypad.h.

Does somebody know how to resolve this ?

Thanks for your help

Benjamin

Are you using pins 4, 10, 50, 51, 52, or 53 for your keypad? If so, that will conflict with the WiFi Shield.

Hi!

Yes I am using digital pins 46 47 48 49 for rows and 50 51 52 for cols of the keypad
And pins 12 8 5 4 3 2 for LCD.

So i think my connexions are really bad. Have you an explanation please?
And you mean that digital pins are used by wifi shield ?

Thanks for your help.

Benjamin

And you mean that digital pins are used by wifi shield ?

Yes.
It is easy enough to change the keypad pins so change them to some other pins that are not being used.

Hi Grumpy_Mike

So I have to connect my components where I want except 4, 10, 50, 51, 52, or 53 as said johnwasser?

Yes but you also have to avoid using the same pins as your LDC circuit.
All three devices need to use differant pins.

Okay I'll try it when I have free time.
I'll keep you informed.

Thanks again

Hi all,

Everything work with your help! Thanks again.

I found what johnwasser was talking about on the WiFi shield webpage ::

Arduino communicates with both the Wifi shield's processor and SD card using the SPI bus (through the ICSP header). This is on digital pins 11, 12, and 13 on the Uno and pins 50, 51, and 52 on the Mega. On both boards, pin 10 is used to select the HDG104 and pin 4 for the SD card. These pins cannot be used for general I/O. On the Mega, the hardware SS pin, 53, is not used to select either the HDG104 or the SD card, but it must be kept as an output or the SPI interface won't work.

I hope this topic will help some people...