zondag, maart 11, 2007

The Apple Sudden Motion Sensor (SMS) to Flash

Not only the keyboard of my MacBook lits up in the dark, it seems to be equiped with a Sudden Motion Sensor or SMS.
This motion sensor is designed to protect your hard disk when the computer is dropped or undergoes severe vibration.

The Sudden Motion Sensor is designed to detect unusually strong vibrations, sudden changes in position or accelerated movement. If the computer is dropped, the Sudden Motion Sensor instantly parks the hard drive heads to help reduce the risk of damage to the hard drive on impact.

Ofcourse the sensor can be used for more vital applications as well. How about a game of Pong anyone? It has been done in Processing, so why not give it a try in Flash. Just for the sake of it!

Here is an example I've build using Java and Flash.



I know the ball is going at 'loser' speed, but hey it's MY party and I cry if I want to!
Download the source code here:

http://www.seeingisbelieving.be/blog/AppleSMS2Flash.zip

Included are the Unimotion library and the Java API to work with it, the Flash files and the Java socket server.
The big picture is you use the Unimotion library in Java for detecting the motion and then send it to the Flash through a Java socket server.

Related links:
Lincoln Ramsey (created Unimotion library)
Daniel Shiffman (created the Java API for Unimotion)
Grant Skinner (for the Flash collision detection)
Info about the SMS

9 opmerkingen:

Anoniem zei

[url=http://loveepicentre.com/map.php][img]http://loveepicentre.com/uploades/photos/9.jpg[/img][/url]
kenya dating mashada [url=http://loveepicentre.com/advice.php]coed dating stories[/url] top iphone dating app
edmonton free dating sites [url=http://loveepicentre.com/faq.php]tubely dating network[/url] i don't believe in traditional dating
free dating online for bi sexual [url=http://loveepicentre.com/advice.php]australian dating site[/url] irish dating

Anoniem zei

christian dating las vegas http://loveepicentre.com/taketour.php websites for dating married people

Anoniem zei

whrilpool repair manual ebook http://audiobooksworld.co.uk/fr/Jewish-World-Around-the-New-Testament-Collected-Essays-I/p228139/ ghostgirl ebook [url=http://audiobooksworld.co.uk/it/Nonlinear-theory-of-elastic-shells/p100338/]lady friday ebook[/url] romance ebook 4.38gb torrent

Anoniem zei

law school ebook http://audiobooksworld.co.uk/es/authors/?letter=V&page=4 in our time free ebook [url=http://audiobooksworld.co.uk/Vladimir-A-Yakubovich/m129577/]the glass menagerie full ebook version[/url] asp ebook
[url=http://audiobooksworld.co.uk/es/Commercial-Photoshop-Retouching-In-the-Studio/p105370/][img]http://audiobooksworld.co.uk/image/2.gif[/img][/url]

Anoniem zei

show software version solaris http://buyoem.co.uk/es/product-24113/BitRock-InstallBuilder-Enterprise-6-0 tax preparation software forms [url=http://buyoem.co.uk/es/category-9/Antivirus-y-seguridad?page=3]palm desktop software download treo 650[/url] windows home server software purchase
[url=http://buyoem.co.uk/de/product-34610/Microsoft-Windows-7-Ultimate-x32-ENGLISH-Service-Pack-1]Microsoft Windows 7 Ultimate x32 ENGLISH Service Pack 1 - Cheap Legal OEM Software, Software Sale, Download OEM[/url] telecommunication billing software
[url=http://buyoem.co.uk/it/category-9/Antivirus-e-Securiti][img]http://buyoem.co.uk/image/8.gif[/img][/url]

Anoniem zei

[url=http://redbrickstore.co.uk/products/entocort.htm][img]http://onlinemedistore.com/11.jpg[/img][/url]
live pharmacy ce in tn http://redbrickstore.co.uk/products/cok-n--energy-and-sensory-enhancer-.htm lake forest park towne center pharmacy [url=http://redbrickstore.co.uk/products/levitra-super-active-plus.htm]animal pharmacy[/url]
getting into pharmacy school http://redbrickstore.co.uk/testimonials.htm radius pharmacy wellington [url=http://redbrickstore.co.uk/products/sublingual-cialis.htm]sublingual cialis[/url]
canada no prescription pharmacy http://redbrickstore.co.uk/products/atrovent.htm jefferson pharmacy philadelphia [url=http://redbrickstore.co.uk/products/baclofen.htm]preckshot pharmacy peoria illinois[/url]
adzema good neighbor pharmacy http://redbrickstore.co.uk/products/cystone.htm mallinckrodt pharmacy jars [url=http://redbrickstore.co.uk/products/cozaar.htm]cozaar[/url]

Anoniem zei

[url=http://certifiedpharmacy.co.uk/products/eurax.htm][img]http://onlinemedistore.com/2.jpg[/img][/url]
pharmacy foundation http://certifiedpharmacy.co.uk/products/dramamine.htm summer pharmacy internships ak [url=http://certifiedpharmacy.co.uk/refer-a-friend.htm]pharmacy working vacation[/url]
ego pharmacy assistant model http://certifiedpharmacy.co.uk/categories/pain-relief.htm nevada canadian pharmacy [url=http://certifiedpharmacy.co.uk/products/atarax.htm]atarax[/url]
epainmedsglobal reviews order barry pharmacy http://certifiedpharmacy.co.uk/categories/anti-herpes.htm lake underhill pharmacy [url=http://certifiedpharmacy.co.uk/products/toprol-xl.htm]stuarts draft family pharmacy[/url]
save on pharmacy feasterville http://certifiedpharmacy.co.uk/products/cialis-super-active-plus.htm cvs pharmacy print records [url=http://certifiedpharmacy.co.uk/products/doxazosin.htm]doxazosin[/url]

Anoniem zei

[url=http://englandpharmacy.co.uk/products/triphala.htm][img]http://onlinemedistore.com/8.jpg[/img][/url]
what college to attend in nc for pharmacy http://englandpharmacy.co.uk/products/menosan.htm online pharmacy ultram [url=http://englandpharmacy.co.uk/products/lanoxin.htm]integrated hmo pharmacy[/url]
about online pharmacy http://englandpharmacy.co.uk/categories/birth-control.htm access pharmacy [url=http://englandpharmacy.co.uk/products/nizoral.htm]nizoral[/url]
pharmacy job iowa http://englandpharmacy.co.uk/categories/women-s-health.htm government pharmacy job [url=http://englandpharmacy.co.uk/products/sublingual-cialis.htm]cvs pharmacy bangor[/url]
certified pharmacy tech accessories http://englandpharmacy.co.uk/products/cialis.htm the first pharmacy [url=http://englandpharmacy.co.uk/products/diabecon.htm]diabecon[/url]

Anoniem zei

tarot deck record software http://downloadoemsoftware.co.uk/it/category-100-112/Multimediale-e-Divertimenti?page=120 computer diagnostic software for professionals [url=http://downloadoemsoftware.co.uk/es/product-37388/Ease-Audio-Converter-2-4]windows web page builder software[/url] german vocal software
[url=http://downloadoemsoftware.co.uk/product-36926/XLineSoft-PHPRunner-6-0]XLineSoft PHPRunner 6.0 - Download OEM, Software Sale, OEM Software[/url] geanology software
[url=http://downloadoemsoftware.co.uk/de/category-100-114/Anderes?page=2][img]http://buyoem.co.uk/image/1.gif[/img][/url]