Updated 20 May 2024
The iPhone packs in a number of sensors. We’ve covered the accelerometer, gyroscope, and magnetometer, and will now take a look at the built in barometer which first appeared in the iPhone 6 and 6 plus smartphones several years ago.
The barometer can be used to detect elevation changes by sensing the changes in air pressure as the phone increases or decreases in altitude.
In todays tutorial we’ll take a look at CMAltimeter which is the class we use to access the barometer.
[Read more…]