Smooth the Accelerometer

Is there a way to dampen or smooth the results you get from accelerometer? I am writing a test that checks the values during onFrame with

local function onTilt( event )  
  
 ball.x = screenX \* event.xGravity + centerX  
 ball.y = screenY \* -1 \* event.yGravity + centerY  
  
 -- physics.setGravity( 50 \* event.xGravity, -50 \* event.yGravity )  
 frameUpdate = false  
 end  

It generally does what I want, but I would like it to be a lot less “jiggly”?

Thanks, I’m new [import]uid: 1606 topic_id: 9019 reply_id: 309019[/import]

Use this:

[blockcode]
system.setAccelerometerInterval( 50 )
[/blockcode]

But play around with the value until you get the desired sensitivity/smoothness. [import]uid: 52430 topic_id: 9019 reply_id: 32901[/import]

thank you! that helps.

just wondering if there is a way to only get it to register hit on the accelerometer when there is a large movement - like someone picking it up or jostling it?

When its at rest, even at 50, it acts like a seismometer.
If I set it down to 10, the sensitivity is awful of course. I’m trying to think of a programmatic way of dampening it. [import]uid: 1606 topic_id: 9019 reply_id: 32926[/import]