Using a cell phone to detect a magnet

Pretty quirky use of the sensors in a cell phone.

As smartphones have gotten smarter their insides have had to get smarter with them. Right now the iPhone in your pocket contains an accelerometer, magnetometer digital compass, gyroscope, microphone, proximity sensor, camera, GPS, and more. Ivo Leko is a developer who was inspired by the possibilities inside our phones to create a new way of interaction with the device.

Using the iPhone’s magnetometer, accelerometer and microphone Leko has written a library in Objective-C and C that allows you to detect the position of a magnet in real time.

There is a simple (boring) video at the link, but what he is showing is by moving the magnet around at the same table as the phone is sitting, he can use the many sensors to detect where the magnet is, if its sitting on the table or lifted off.

At this stage he can not really do much with it, but it should open the door for others to take his code and think about what other hardware devices can be interfaced with a mobile phone in non-conventional ways.