Search code examples
arduinoconflictgsmethernet

GSM shiled and Ethernet shild compatibility


I have an Arduino Uno Rev. 3 and have bought a GSM Shield and an Ethernet Shield. If I use the Arduino and GSM shield or the ethernet shield all works well. However, I want to use the Arduino with both the GSM shield and the ethernet shield.

I have searched the Internet and have read that I have a conflict on pin 4. The GSM shield uses pin 4 for the SD Card and the ethernet shield uses pin 4 for TX.

Can i fix this error? Is it possible to change this pin.


Solution

  • In a shield, hardware is managed in such a way that it will always connect to the particular pins. you can understood this in this way that if you place your Ethernet shield upon the Arduino then Ethernet's Tx pin will always connect to Arduino's pin 4.

    So there is only one method to overcome this problem, don't place Ethernet shield directly to Ardunio. connect this with the jumpers externally and change Tx pin 4 to another pin in the programming which is free.

    I don't know which pins are free in your code but lets assume Arduino's pin 6 is free so declare this as Ethernet TX pin (you will find out this in program) and connect this to Ethernet's pin 4.

    You can use only one shield directly, now choose which one you want to use directly and change the pin configuration for the shield which is used externally.