Polling the accelerometer/motion sensor in a MacBook Pro
Asked Answered
P

2

5

There is a compiled command line application here that does this.

Is there a Cocoa API to query this data?

Parfitt answered 11/8, 2011 at 20:59 Comment(0)
R
4

You can try SMSLib, which is an open-source Objective-C library for accessing the sudden motion sensor.

Rondure answered 12/8, 2011 at 1:40 Comment(0)
T
4

There isn't a Cocoa API for the motion sensor. It's only available through calls to IOKit. It's described in Mac OS X Internals.

Tribunate answered 11/8, 2011 at 21:24 Comment(1)
A better link is this one which is the author's page about the sudden motion sensor with sample code.Rondure
R
4

You can try SMSLib, which is an open-source Objective-C library for accessing the sudden motion sensor.

Rondure answered 12/8, 2011 at 1:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.