To get the values, you can use 3 shapes, and here they are:
Declare
let motionKit = MotionKit()
And so get the data in the following ways:
Accelerometer data:
motionKit.getAccelerometerValues(interval: 1.0){
(x, y, z) in
//Do whatever you want with the x, y and z values
println("X: \(x) Y: \(y) Z \(z)")
}
Gyro data:
motionKit.getGyroValues(interval: 1.0){
(x, y, z) in
//Do whatever you want with the x, y and z values
println("X: \(x) Y: \(y) Z \(z)")
}
magnetic field around your device:
motionKit.getMagnetometerValues(interval: 1.0){
(x, y, z) in
//Do whatever you want with the x, y and z values
println("X: \(x) Y: \(y) Z \(z)")
}