HELP: tri axis Accelerometer smoothing

Try in loop:
{
new_value = A * get_new_value() + B * old_value;
...
old_value = new_value
}
where A + B = 1.0

for example A=0.1 and B=0.9, the smaller the A the stronger the low-pass filtering effect.
p.