What really sets the iPhone apart from laptops and PCs is its use of onboard sensors, including those that are location-enabled. This concise book takes experienced iPhone and Mac developers on a detailed tour of iPhone and iPad hardware by explaining how these sensors work, and what they're capable
Basic Sensors in IOS: Programming the Accelerometer, Gyroscope, and Magnetometer
โ Scribed by Alasdair Allan
- Publisher
- O'Reilly Media
- Year
- 2011
- Tongue
- English
- Leaves
- 106
- Category
- Library
No coin nor oath required. For personal study only.
โฆ Synopsis
What really sets the iPhone apart from laptops and PCs is its use of onboard sensors, including those that are location-enabled. This concise book takes experienced iPhone and Mac developers on a detailed tour of iPhone and iPad hardware by explaining how these sensors work, and what they're capable of doing.With this book, you'll build sample applications for each sensor, and learn hands-on how to take advantage of the data each sensor produces. You'll gain valuable experience that you can immediately put to work inside your own iOS applications for the iPhone, iPod touch, and iPad. This book helps you focus on:Camera: learn how to take pictures and video, create video thumbnails, customize video, and save media to the photo album Audio: use the media picker controller and access the iPod music library in your own application, and enable your app to record and play sampled audio Accelerometer: write an application that uses this sensor to determine device orientation Magnetometer: learn how this sensor verifies compass headings Core Motion: use this framework to receive motion data from both the accelerometer and the vibrational gyroscopeThis short book is part of a collection that will, along with new material, be compiled into a larger book, iOS Sensor Programming. The other books in this collection are Augmented Reality in iOS, Geolocation in iOS, and iOS Sensor Apps with Arduino.
โฆ Table of Contents
Table of Contents......Page 7
What Will You Learn?......Page 9
Conventions Used in This Book......Page 10
Safariยฎ Books Online......Page 11
Acknowledgments......Page 12
Available Sensor Hardware......Page 15
Differences Between iPhone and iPad......Page 16
Detecting Hardware Differences......Page 18
Audio Input Availability......Page 19
Setting Required Hardware Capabilities......Page 20
Background Modes......Page 21
The Hardware......Page 23
Capturing Stills and Video......Page 24
Video Thumbnails Using the UIImagePicker......Page 32
Video Thumbnails Using AVFoundation......Page 33
Saving Media to the Photo Album......Page 34
Video Customization......Page 37
The Hardware......Page 39
Media Playback......Page 40
Recording and Playing Audio......Page 45
Recording Audio......Page 46
Playing Audio......Page 49
About the Accelerometer......Page 51
Writing an Accelerometer Application......Page 52
Determining Device Orientation......Page 57
Determining Device Orientation Directly Using the Accelerometer......Page 60
Obtaining Notifications when Device Orientation Changes......Page 62
Which Way Is Up?......Page 63
Convenience Methods for Orientation......Page 66
Detecting Shaking......Page 67
About the Magnetometer......Page 71
Writing a Magnetometer Application......Page 73
Determining the Heading in Landscape Mode......Page 76
Measuring a Magnetic Field......Page 82
Core Motion......Page 85
Pulling Motion Data......Page 86
Pushing Motion Data......Page 87
Accessing the Gyroscope......Page 89
Measuring Device Motion......Page 93
Comparing Device Motion with the Accelerometer......Page 97
Third-Party SDKs......Page 101
External Accessories......Page 102
โฆ Subjects
ะะธะฑะปะธะพัะตะบะฐ;ะะพะผะฟัััะตัะฝะฐั ะปะธัะตัะฐัััะฐ;IOS / iPhone / iPad / iPod;
๐ SIMILAR VOLUMES
What really sets the iPhone apart from laptops and PCs is its use of onboard sensors, including those that are location-enabled. This concise book takes experienced iPhone and Mac developers on a detailed tour of iPhone and iPad hardware by explaining how these sensors work, and what they're capable
Some years ago, silicon-based mechanical sensors, like pressure sensors, accelerometers and gyroscopes, started their successful advance. Every year, hundreds of millions of these devices are sold, mainly for medical and automotive applications. The airbag sensor on which research already started se
Some years ago, silicon-based mechanical sensors, like pressure sensors, accelerometers and gyroscopes, started their successful advance. Every year, hundreds of millions of these devices are sold, mainly for medical and automotive applications. The airbag sensor on which research already started se
<p>Modern mobile platforms, such as Apple’s iPhone and iPad, come with a growing range of sensors; GPS, accelerometers, magnetometers and gyroscopes. This book guides you through how to make use of these sensors, giving you the necessary tools and experience to develop applications that makes
<p>Modern mobile platforms, such as Apple’s iPhone and iPad, come with a growing range of sensors; GPS, accelerometers, magnetometers and gyroscopes. This book guides you through how to make use of these sensors, giving you the necessary tools and experience to develop applications that makes