Skip to content

Hardware Hacking for iOS Programmers

2012 August 30

The arrival of the iPhone changed the whole direction of software development for mobile platforms, and has had a profound impact on the hardware design of the smart phones that have followed it.

Not only do these devices know where they are, they can tell you how they’re being held, they are sufficiently powerful to overlay data layers on the camera view, and record and interpret audio data, and they can do all this in real time. These are not just smart phones, these are computers that just happen to be able to make phone calls.

Alasdair demonstrating an Augmented Reality application

The arrival of the External Accessory Framework was seen, initially at least, as having the potential to open the iOS platform up to a host of external accessories and additional sensors. Sadly, little of the innovation people were expecting actually occurred, and while there are finally starting to be some interesting products arriving on the market, for the most part the External Accessory Framework is being used to support a fairly predictable range of audio and video accessories from big-name manufacturers.

The reason for this lack of innovation is usually laid at the feet of Apple’s Made for iPod (MFi) licensing program. To develop hardware accessories that connect to the iPod, iPhone, or iPad, you must be an MFi licensee.

Unfortunately, becoming a member of the MFi program is not as simple as signing up as an Apple Developer, and it is a fairly lengthy process. From personal experience I can confirm that the process of becoming an MFi licensee is not for the faint-hearted. And once you’re a member of the program, getting your hardware out of prototype stage and approved by Apple for distribution and sale is not necessarily a simple process.

However all that started to change with the arrival of Redpark’s serial cable. As it’s MFi approved for the hobbyist market it allows you to connect your iPhone to external hardware very simply, it also allows you to easily prototype new external accessories, bypassing a lot of the hurt you experience trying to do that wholly within the confines of the MFi program.

Another important part of that change was the Arduino. The Arduino, and the open hardware movement that has grown up with it and to a certain extent around it, is enabling a generation of high-tech tinkers to prototype new ideas with fairly minimal hardware knowledge.

Every so often a piece of technology can become a lever that lets people move the world, just a little bit. The Arduino is one of those levers. While it started off as a project to give artists access to embedded microprocessors for interactive design projects, I think it’s going to end up in a museum as one of the building blocks of the modern world. It allows rapid, cheap prototyping for embedded systems. It turns what used to be fairly tough hardware problems into simpler software problems.

Turning things into software problems makes things more scalable, it drastically reduces development time scales, and up front investment, and as the whole dot com revolution has shown, it leads to innovation. Every interesting hardware prototype to come along seems to boast that it is Arduino-compatible, or just plain built on top of an Arduino.

Arduino being controlled from iPad

Controlling an Arduino directly from the iPad

I think the next round of innovation is going to take Silicon Valley, and the rest of us, back to its roots, and that’s hardware. If you’re a software person the things that are open and the things that are closed are changing. The skills needed to work with the technology are changing as well.

Alasdair Allan talking at a workshop

Alasdair presenting at a master class on Augmented Reality

At the start of October I’ll be running a workshop on iOS Sensors and External Hardware. It’s going to be hardware hacking for iOS programmers, and an opportunity for people to get their hands dirty both the internal sensors in the phone, and with external hardware.

The workshop is intended to guide you through the start of that change, and get you hands-on with the hardware in your iPhone you’ve probably been ignoring until now. How to make use of the on-board sensors and combine them to build sophisticated location aware applications. But also how to extend the reach of these sensors by connecting your iOS device to external hardware.

Blinking the heartbeat LED of a BeagleBone from the iPhone

We’ll look at three micro-controller platforms, the Arduino and the BeagleBone and Raspberry Pi, and get our hands dirty building simple applications to control the boards and gather measurements from sensors connected to it, directly from the iPhone. The course should give you the background to build your own applications independently, using the hottest location-aware technology yet for any mobile platform.

The workshop will be on Monday the 8th of October at the Hoxton Hotel in London at the heart of  Tech City, and right next to Silicon Roundabout. I’m extending a discount to readers; 10% off the ticket price with discount code OREILLY10. That makes the early bird ticket price just £449.10 (was £499), or if you miss the early bird deadline (the 1st of September) a full priced ticket still only £629.10 (£699).

Alasdair Allan is the author of Learning iOS Programming, Programming iOS Sensors, Basic Sensors in iOS, Geolocation in iOS, iOS Sensor Apps and Arduino and Augmented Reality in iOS. Last year he and Pete Warden caused a privacy scandal by uncovering that your iPhone was recording your location, all the time. This caused several class action lawsuits and a U.S. Senate hearing. He isn’t sure what to think about that. From time to time he stands in front of cameras, and you can often find him at conferences run by O’Reilly Media. He runs a small technology consulting business writing bespoke software, building open hardware and providing training, including a series of workshops on sensors. He sporadically writes blog posts about things that interest him, or more frequently provides commentary about them in 140 characters or less. Alasdair is also a senior research fellow at the University of Exeter. As part of his work there he built a distributed peer-to-peer network of telescopes which, acting autonomously, reactively scheduled observations of time-critical events. Notable successes included contributing to the detection of the most distant object yet discovered, a gamma-ray burster at a redshift of 8.2.

One Response Post a comment
  1. avatar
    December 26, 2012

    This is a very interesting topic as I am a nerd in both the ios and arduino arenas. Has this been video recorded? I see that it has already happened.

Leave a Reply