AirPodsPro-Motion-Sampler
AirPodsPro-Motion-Sampler copied to clipboard
This project is a sample to get the motion sensor values of the AirPods Pro(1st or 2nd gen) / AirPods Max / AirPods(3rd gen) or Beats Fit Pro.
AirPodsPro-Motion-Sampler
Code Examples of CMHeadphoneMotionManager in CoreMotion.
Requirements
- Xcode: 12.0+
- iOS : 14.0+
- iPhone, iPad (*1)
- AirPods Pro / AirPods Max / AirPods(3rd generation) or Beats Fit Pro
*1: iPod Touch (7th generation) is not supported.
*2: The necessary sensors are included, so it should work.
How To Build
Open AirPodsProMotion.xcodeproj
on Xcode12 or later, then connect your iPhone or iPad to build it.
Contents
By Head Motion |
By Head Motion |
||
---|---|---|---|
![]() |
![]() |
![]() |
![]() |
-
infomation View
Displays the information (CMDeviceMotion
) obtained from AirPodsPro. -
Rotate the Cube By Head Motion
The cube rotates in sync with the orientation of the face. -
Tabel scrolling By Head Motion
Move the face up and down to scroll the TableView.
We don't use any hands at all. -
Export motion data to CSV
Export the motion data acquired from AirpodsPro as a CSV file.
You can check the data by using afile App
.
For more information, a CSV file is stored in the 'Files App > On My iPhone > AirPodsPro' directory.
Reference
Author
Yoshio Tsukuda