PhoneGap accelerometer ball

I am writing this post as part of a course called Mobiilituotekehitys (Mobile development) held by Tero Karvinen http://terokarvinen.com/2012/aikataulu-mobiilituotekehitys-bus4tn008-2

I am using Eclipse to develop PhoneGap applications on a 64-bit Xubuntu 12.10 installed on a HP EliteBook 2560p Laptop.

Program Name

SamusAcceleratingBall

Description

The ball rolls to either left or right according to where you tilt the phone.

Status

Doesn’t work / alpha / beta / release

Tested on Samsung Galaxy Gio S5660 & Sony Ericsson Xperia Active

Screenshots

APK-file

http://myy.haaga-helia.fi/~a1103361/MD/nov21/SamusAcceleratingBall.apk

Source code

http://myy.haaga-helia.fi/~a1103361/MD/nov21/SamusAcceleratingBall.tar.gz

Technical information

The program checks if the phone is tilted a certain amount either clockwice or counter-clockwise and changes the balls position accordingly by looping the ball’s x’-location and adding or reducing 5. Depending which way the phone is tilted.

Notes

I used Accelerometer API and processing-1.4.1.min.js -library to do this assignment.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s