Categories
TUTORIALS

Push Button to Send SMS with GPS Location [i.e., Panic Button]

Adafruit has an awesome tutorial on properly wiring and testing your Fona808; you can find it (here). If you want a description of the chip components and required accessories, you can find that (here). This tutorial is based on wiring to an arduino, so make sure you look at the correct tutorial (i.e., not the USB version).

THE CIRCUIT:

WHAT YOU NEED:

PART I | Getting Started

1.1  ASSEMBLY

A) Soldering: You must solder the FONA808 to the header strip or it will NOT produce  stable electrical contact (and, therefore, will not work). If you’ve never done this before, check out Adafruit’s guide (here) and/or watch this video. I thought I could skip this step, but alas…

B) Wiring: (based on Arduino UNO)

  • Vio connects to 5V 
  • GND connects to GND
  • Key connects to GND (always on)
  • RX connects to digital 2
  • TX connects to digital 3
  • RST connects to digital 4
  • PUSH BUTTON connects to digital 8 (with 10 OHM RESISTOR)
  • RGB LED connects to digital 9,10,11 (with 330 OHM RESISTORS)

(see image above)

1.2  TEST HARDWARE

C) DOWNLOAD FONA 808 LIBRARY (here) and perform a hardware test (here).

PART 2 | THE CODE

A) BEFORE RUNNING THE CODE

  1. UPDATE the phone number that you want the text sent to (I’ve removed mine). There are two locations where you will have to make this change. (see image above)
  2. Upload the code (below) to your arduino uno.
  3. Open the serial monitor.

B)  RUN THE CODE

PART 2 | DEMO

A) Once the RGB LED is blinking red, we’re ready to test. HOLD Down the Button (for about 2-3 seconds) then release it

B) First, look at the serial monitor. Were you able to get a GPS fix? Hint: If you can see GPS coordinates, then you did!

If not, repeat step 1. (You may need to test near a window or in a place with great cellular reception, since the SMS will not send without getting a GPS fix).

C) IN THE SERIAL MONITOR, after you get a fix, you’ll see the number and message you designated in the code (not +11111111111 as you see in the image below). You’ll also notice that the RGB LED now blinks BLUE (for about 30 seconds).

D) THE SMS (you’ll get the message you created at whatever phone number you designated in the code).

E) THE LINK (it works!)

YOU’RE DONE! 

Comments are welcome! Congrats, and thanks for panicking!

2 replies on “Push Button to Send SMS with GPS Location [i.e., Panic Button]”

Hello, I am a High School student that is working on a project involving the use of GPS locations and automatic texting services, but we have no use for the push button in your code. Is there a way to get rid of these push button commands, also what are the numbers next to latitude and longitude referring to because we have looked through the code and have no idea what they are referring to.

Leave a Reply

Your email address will not be published. Required fields are marked *