Tips and Tricks (Part 26)

Previous T&T

Building a tracking device is no big deal for the Arduino enthusiasts. All you need is an Arduino board (e.g. a UNO), a GPS shield and a GSM shield.

P1170993

Too bad, we have a problem here because of the pin-out of the shields. The GSM shield uses pin 2 and 3 for the Rx and Tx connexions with the mode and pin 7 is used as the “Reset pin” which is responsible for remotely switching on and off the modem. Note that the “Power” button next to the SIM card does the same… manually.

On the other hand, the Adafruit “Data logger” shield features multiple functions such as an RTC, a SD card reader and a GPS chip. And this GPS shield uses pin 8 and 7 for Rx and Tx connexions. Blam ! Pin 7 is now overburdened.

Here is a simple turnaround which will allow you to plug both shields with very little modifications.

Hardware

P1170997

Remove the solder strap next to pin 7 and solder a wire between any other available pin (e.g. pin 6) and the live side of the conductive layer.

Software

Get to the GSM library folder (typically: C:\Program Files (x86)\arduino\libraries\GSM\src) and apply two modes on files GSM3IO.h and GSM3ShieldV1.cpp. Both initially feature a line which looks like:

#define __RESETPIN__ 7

that you will change a comment like that

#define __RESETPIN__ 6 /* Reset pin changed from 7 to 6 by DL 20160809 */

Save both files and compile your code

Done.

HTH

Next Tip and Trick

Leave a Reply

You must be logged in to post a comment.