This article is based on iPhone in Action, to be published January 2009. It
is being reproduced here by permission from Manning Publications. Manning
early access books and ebooks are sold exclusively through Manning. Visit the
book's page for more information.
The iPhone's accelerometers can provide access to a variety of information
about where an iPhone exists in space. By measuring gravity, you can easily
discover an iPhone's precise orientation. By measuring movement, you can see
how an iPhone is being guided through space. Further, you can build more
complex movements into three-dimensional gestures, such as the shake.
Although we usually think about the iPhone's touch screen in reference to
input, the accelerometers provide another method that could allow users to ... (more)