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.
Code Examples of CMHeadphoneMotionManager in CoreMotion.
*1: iPod Touch (7th generation) is not supported.
*2: The necessary sensors are included, so it should work.
Open AirPodsProMotion.xcodeproj
on Xcode12 or later, then connect your iPhone or iPad to build it.
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 a file App
.
For more information, a CSV file is stored in the ‘Files App > On My iPhone > AirPodsPro’ directory.
Yoshio Tsukuda