hey,

i receive one value from an accelerometer that shows the roll of the accelerometer the value ranges from-180 to 180 which is 360 degree angel.

what i want is to represent this value on the screen by drawing a line that would rotate accordingly to my accelerometer.

this video should give you an idea of what im trying to achieve
http://www.youtube.com/watch?v=nFA7xR6ZSqg&feature=player_embedded

THANK YOU

Recommended Answers

All 2 Replies

OK, you have 2 choices to do this - in JavaScript or SVG. If you are going to do it in JavaScript, it will be a bit difficult and may be slow because JavaScript is not for graphic rendering. You could check this link for further javascript library you may want to pick. If you do it in SVG, it will give you much better graphic (even better than the one you saw in youtube); however, its implementation may not be for beginners especially the animation part. Either way, you need some times to learn. If I were you right now, I would pick a javascript library and work on it.

i dont have much time to learn anything else, unfortunately..... wouldn't it be possible to create everything just using java. i assume the calculation of converting 360 degrees received from the accelerometer in to x and y would be some sort of trigonometry calculation and then it could be drawn on to the screen by using simple line, i guess.

Thank you very much for your response

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.