Using sudden motion sensor as accelerometer on OSX

This is still under development. But I am creating a PR for easy reference.