Make Every Week: Temp -> Text -> Table

Texting temperature data to Twitter is fun, but more useful is sending that information to a table.

That’s what I did this week, as my wanderings into wireless data collection continue: Post the temperature and humidity from my little experiment to a table at

Here are the steps as things stand now:

  1. The sensor reads the data (as in my original post).
  2. The Ardunio formats a message and texts it with a Fona (wiring details here, updated code here).
  3. Instead of texting to Twitter, it now texts to a phone number I bought at Twilio for $1/month.
  4. Twilio then relays that data to my project server in the Amazon cloud as an http “POST” (deets on setting up a cloud server here).
  5. My project server parses the text message, composes a URL with the data, and hits the Sparkfun open data system with that URL (code for that is here).

This all happens in just a few seconds, every 20 minutes.



I like sending data via SMS text. It feels simple and clean, and it’s actually not that complicated. But there are some ways this could be simpler.

One is to stop after Step 3, the text to Twilio. Twilio actually logs every incoming text, including the time and contents, which one can download as a csv. It’s available only to the Twilio account holder, so it’s not public like the Sparkfun table, but it’s got all the information right there and is timestamped, too.

Another way is to skip both Twilio my sever entirely and at Step 2 have the Arduino and Fona use a cellular data connection to hit the Sparkfun site all by itself. The Arduino would need to compose the URL and then basically open an internet channel to use it. That’s what Kina Smith did here (see the sendURL function). I definitely plan to give that a whirl.

Excitable Boy

I’m pretty happy that I’ve managed to learn enough Node JavaScript to have built the interface between Twilio and Sparkfun in just about an hour. It’s similar to my picture-texting project. And it works.

I’m also excited that the low-power tricks I’m using in my Arduino code have kept this little box running for a couple of weeks now … and the battery has barely drained at all. I’m tempted to let it keep running until it dies, just to see how long that really is. At this rate, it could be a couple of months!

#MakeEveryWeek is a challenge to myself to do just that for all of 2015. The original post on the idea is here, and the running list of projects is here.

2 responses
Nice work! Text is, indeed, pretty clean since you're using a GSM interface. If you can can make an HTTP GET or POST directly, you could cut Twilio out of this process. Also, have you looked at something like Thingspeak which would let you do the datalogging and display in one place?
I think you should run a contest and see if anyone can guess when it will run out. Maybe a prize for correct guess? Maybe just a kudo :-)