Skip to content

PyAppleSMS

Michele Ferretti released PyAppleSMS, a tool to use the Sudden Motion Sensor shipped in the latest Apple’s notebooks. You can find it here: http://code.google.com/p/pyapplesms/

Code example:

[code lang="python"]

!/usr/bin/env python

import applesms import time

try: while True: x, y, z = applesms.coords() print x, y, z time.sleep(1) except applesms.error, e: print 'an error occurred: %s' % str(e) [/code]

Have fun!

Share and Enjoy:
  • Print
  • Digg
  • StumbleUpon
  • Facebook
  • Twitter
  • Google Bookmarks
  • FriendFeed
  • Google Buzz
  • HackerNews
  • Posterous
  • Reddit
  • Slashdot
  • Tumblr