Week8 Notes

Getting outside the phone: Physical Objects

We have talked quite a bit about the power of the voice and our relationship to it as humans. Quite a bit is being done at ITP in the realm of new interfaces and displays which is equally as exciting. In this class we will explore the possibilities for combining these.

Physical Objects
We know that Asterisk can access data on the internet and has the ability to interact with that data. What if we took the next step, and we utilized the phone as interface to networked physical objects connected on the Internet?

This is pretty easily accomplished using Asterisk/AGI/Ruby on one side and Arduino/Networking Shield (WiFi, Ethernet, GSM) on the other. Combining these two gives us the ability to give voice to our projects or allow them to be controlled with a simple phone call and something like touch tone.

Arduino Ethernet Shield

The Arduino Ethernet Shield is easy to use but there are a few “gotchas”.

  • You will want to use a newer Arduino like the Arduino Uno. The shield didn’t work with my older Arduino boards.
  • Your Shield’s MAC address is printed on the bottom of the board.  I’m using 00:AD:BE:EF:ED:1A for my Shield, which in Arduino code could be set like this:
byte mac[] = { 0x00, 0xAD, 0xBE, 0xEF, 0xED, 0x1A };
  • You will need to talk to Marlon to get an IP address on the ITP floor. You tell him the MAC address and he’ll map your choosen MAC address to an IP address. One nice thing about ITP IP addresses is that they are public IP addresses so you can theoretically set up a public server inside your Arduino!

MORE INFO:
Info on the Arduino Ethernet Shield:
Info on the Arduino Ethernet Library:
Arduino Ethernet Shield from SparkFun

Arduino GSM Shield

Arduino has a brand new GSM shield on the market!  You’ll need the latest Arduino IDE for the GSM library (1.0.4 or greater).

I had no trouble buying a T-Mobile SIM card and $30 worth of service.  The plan I chose was for $2/day unlimited Voice/SMS/GPRS Data, but only on days that I use it.  $30 gives me 15 days of use, whenever I want, and I can always add more later, or switch to another plan.  Pretty great!

The T-Mobile sales person made me choose a PIN, but I didn’t need to use it in my Arduino sketches.  Here’s the info that worked for me for accessing the GSM network, and setting up GPRS Data:

// PIN Number
#define PINNUMBER ""
// APN data (Only necessary if you're accessing the Internet)
#define GPRS_APN "epc.tmobile.com" // replace your GPRS APN
#define GPRS_LOGIN "" // replace with your GPRS login
#define GPRS_PASSWORD "" // replace with your GPRS password

Sending and receiving SMS and data worked perfectly with the included examples.  I didn’t try a voice call, since a mic and speaker need to be soldered to the board for voice to work.

The only “gotcha” I encountered was that I was using a Developer edition of the GSM board, and I needed to turn the Modem on by hitting the “power” button on the shield. I’m told that the later versions of the shield will power on automatically when the Arduino has power.