tregoning/photoTilt — pull request #1 by drien (2014-02-03 16:32:10+00:00)
Title: Added moving average filter on deviceorientation data

Howdy— Cool little project, thanks for putting it together! I felt that the scrolling seemed a little jumpy, especially if you didn't have perfectly steady hands, so I tried adding a really simple moving average filter to the accelerometer event to smooth out noise and shakiness, and it seems to have made it a fair amount smoother, at least on my phone.

After a little bit of experimentation I settled on averaging the 5 latest inputs, which seemed to yield the best combo of responsiveness and smoothness, though that number could certainly be changed to change the effect.

Anyway, here's my patch if you're interested.