How to smooth accelerometer values

I am new to unity…I just want to smoothen the accelerometer values…so that i have to move GUI label having sniper scope position with accelerometer values(x&y) without any jerk or vibration. I have to start a ray from the midpoint of scope to 3d world where camera is moving…!

It is possible to use some frequency filters for rounded value. For example, lowPasFilter, highPasFilter, etc. More detailed information can be found on wiki. It is also possible to use the lerp function,for example(write on CSharp):

 float myXaceel = 0.0f;
 float myYaceel = 0.0f;
 float smoothSpeed = 1.0f;

 void LateUpdate() {
  Vector3 acceler = Input.acceleration;
  //maybe need normalize vector accelerometr
  myXaccel = Mathf.Lerp(myXaccel, acceler.x, smoothSpeed * Time.deltaTime);
  myYaccel = Mathf.Lerp(myYaccel, acceler.y, smoothSpeed * Time.deltaTime);

When you have a fairly easy sounding unity question, it has probably been asked many times before, so best try searching on Google 1st, you’ll get even more answers than by asking and faster.