This example uses Input/Output Ports, which have been replaced by Agents and HTTP request-based communication. This code will not work as currently written, but remains primarily as a reference for older designs.
Examples of the current communication architecture are available at http://electricimp.com/docs/examples/