Related topics

Little devil: Electric Imp is an Internet of Things Wi-Fi PC-ON-AN-SD-CARD

The card micro that makes connecting projects to the cloud easy

Internet enabling... anything

The Imp API is a work in progress too, but it’s already capable. It defines object representations of the Imp itself and its key features, including pins, buses, timers, non-volatile storage, its wireless sub-system, its sleep mechanism and such to allow code running on the device to access these features. It also maintains separate representations of the Imp and the Agent to allow each to register on one the code that will be run when a message comes in from the other, and to respond if necessary.

Electric Imp and Impee

Eleven pins for power and GPIO

Agent software can also make use of an HTTP-centric API to mediate communications between a browser or a mobile app and the Agent, and to prepare and interpret data transmitted in JSON form. Data can be encrypted for security. The Agent can also interact with the server it’s running on.

Electric Imp’s own tutorial code was sufficient to allow me to begin adapting it to switch a red LED lamp on my breadboard on and off remotely and then to add a second, green LED using a second GPIO pin as a switch. A third, amber LED and you have a set of traffic lights YOU can control. Kind of.

Whatever, there’s a real buzz to be had when you so easily and so quickly get something usually so complicated to work. With the basics of browser-Agent-Imp communication established, it wasn’t hard to subsequently hook up the small thermal printer I usually run off my Raspberry Pi’s UART bus to the breadboard and have the Imp print different messages depending on the value of a parameter passed to the Agent’s unique URL.

All I had to do was enable UART communications on the Imp. The printer’s documentation provided the local control command characters, and equally a way for the Imp to check on the status of the printer so it can tell me if the paper has run out, there are problems with the power, or it has overheated, say.

Electric Imp

App to internet: “Print.” Internet to Imp: “Print.” Imp to printer: “Print.” Printer prints

Half an hour later, I had a working iPhone app able to trigger printed messages remotely at the touch of a button. These are trivial applications intended only for testing, of course, but they show that the Imp has a lot of potential.

It’s entirely possible to do this with the Raspberry Pi, the Beaglebone and the various Arduino boards. Indeed, Imp’s size is less of a USP now that you can get very small DIY microcontroller units, such as Adafruit’s Arduino-friendly Trinket, which are more robust than the Imp alone. There’s a cost-saving logic to putting the Imp inside an SD card casing, but since you’ll need some kind of connector to interface it to the rest of your hardware - even if you’re not using an Impee - it’s not actually as practical a form-factor as you might think.

But what Electric Imp provides out of the box and which these alternatives don’t is a clear, functional API for responding to incoming control and information request messages. It also has cloud infrastructure in place so you don’t need to set all that up either. Haines says it's good to support hundreds of thousands of Imps and work is under way to scale it to cope with millions of the devices.

Of course, all this development work is predicated on this small startup persuading big customers to put its technology into their existing and new products to allow that kit to communicate over the internet. Some, such as GE, are already starting to do so, but there’s a long way to go. Spotter’s Spotter is a product based on Electric Imp tech

The Reg Verdict

The Imp is a great way to connect projects and products to the internet. The hardware is inexpensive - $30/£24 for the Imp; $13/£16 for an Impee breakout board - and if the Squirrel language used to program it is unfamiliar, it’s not at all hard to pick up. The Imp API is clear and capable. It really makes Wi-Fi easy, and its power-saving modes can apparently eke out battery life for months.

All this confirms the Imp as a powerful alternative to more established DIY computing platforms if your project needs internet connectivity for remote control or sensing. Don’t take my word for it: the Imp’s asking price is low enough to try if for yourself.

When you’re remote-controlling your hardware after a just a half-hour’s experimentation, you’ll wonder why you hadn’t embraced the Imp and the Internet of Things before. ®

Sponsored: 10 ways wire data helps conquer IT complexity

Electric Imp

Little devil: Electric Imp is an Internet of Things Wi-Fi PC-ON-AN-SD-CARD

Cheap-as-chips ultra-compact computer-on-a-card with on-board Wi-Fi that’s ideally suited to Internet of Things projects.
Price: £24 (Imp) £16 (Impee breakout board) RRP