Dynamic graphs for the accelerometer.

All your problems with Audio, Video and Images.

Dynamic graphs for the accelerometer.

Postby keithamus » Wed Apr 01, 2009 12:24 am

I am new to java, and android. I come from a PHP background, so playing with java is like learning programming all over again.

I am trying to make an application (for developers), which will dynamically graph accelerometer usage. Right now I am capturing accelerometer values quite nicely, at 50 samples a second, by creating a timer and checking the values every 20ms (I have no idea why we are given such unspecific sample sizes as "Game" and "UI"). (As an aside, this is one issue I am having, because I am using CountDownTimer(), which does exactly what I need (i.e onTick), except for it does it for a finite time (as per the first arg), is there not a timer which has the functionality of CountDownTimer(), without actually counting down to an end?)

Essentially I want my main screen to have 3 graphs, for the X Y and Z values of the accelerometer. Each graph will have the Y value as the amount recording from the sensor, while X will be time. These graphs will be updated every 100ms to get the latest averaged values from my accelerometer sample, so hopefully, as a developer, I can record spikes in graphs based on my actions (and subsequently program gestures based on the graph data).

Right now, I have two main problems. The biggest one is getting a dynamic graph. I searched on the forums and graphing doesn't exactly seem like a hot topic. I've seen this: http://android.arnodenhond.com/graphview but it seems as though I would have to predefine a set of values, then initiate the graph view - not very dynamic!
keithamus
Once Poster
Once Poster
 
Posts: 1
Joined: Tue Mar 31, 2009 11:49 pm

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: Exabot [Bot] and 11 guests