This Instructable explains how to send an SMS from an Arduino using the Internet. There are many ways to approach this and I will explain one of the different methods used to accomplish this task.
Some major points needed for my project:
So aside from the hardware, I found three main ways to interface with the Arduino and send an SMS.
I tested all of these methods, and only one successfully worked on my ENC28J60 Ethernet module, the target I was going for. But more importantly the code on the Arduino side is very simple, and should work using WiFi or Ethernet without any special libraries, other than the standard Ethernet communication libraries.
So again I will only explain method number 3. If you want to use another method there are other guides on the internet, but I felt like Thingspeak ThingHTTP is slighjtly undocumented.
Step 1: SetupThe hardware is pretty simple.
The software is a little more complicated to set up.
Since the Arduino does not support HTTPS, we are going to use Thingspeak to trigger Twilio.
You will need:
If you are using the ENC28J60 or wifi module, you will need the acompaning libraries. For the ENC28J60, I reccomend Arduino UIP. Download the zip and move it to the libraries folder. https://github.com/ntruchsess/arduino_uip
Okay now that's all set up, we will start the configuration.
Step 2: Configuring Thingspeak ThingHTTPGo to Thingspeak.com, click on apps, then ThingHTTP, and then New ThingHTTP. This will take you to the setup page. You will have to find your Twilio account SID and auth token on your Twilio dashboard page
Copy the following data into the fields. Where italics and caps you must replace with the data from Twilio.
Click Save ThingHTTP
Take note of the API key for your ThingHTTP. You will need it in the Arduino sketch
Step 3: Arduino SideThe Arduino will need a connection to the internet, again the Ethernet shield and ENC28J60 Ethernet module will both work, and Wifi will too with some small changes to the program
Here is a guide to connect the ENC28J60 to the Arduino https://www.instructables.com/id/Add-Ethernet-to-a...
This code will work both with the Arduino Ethernet Shield and the ENC28J60 Ethernet module, with a simple modification. Download the file and change the API key and phone number to your own, then upload it.
Test the program, and hopefully within a few seconds your phone will receive the SMS. The Serial monitor will also display some helpful information for debugging.
Good luck and hope this was helpful!
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4