Android Smooth Follow Accelerometer

Good morning guys
I want to ask you how can I create a smooth follow which rotates the camera at the opposite value of the accelerometer.y.
I mean, that I want the view remains always parallel to your eyes when playing. Could anyone help me out creating this?
I tried to create it with just adding: this codeline in the smoothfollow script:
transform.rotation.z = -input.accelerometer.y;
But i got bad result, the camera continues to vibrate, also when the device was on stationary object like a table.
Then I tried to round the value with:
transform.rotation.z = Mathf.Round (-input.accelerometer.y*100)/100;
But i got the same result.
How can I create this script?
Thanks, have a nice day!

Could any one please help me?

Instead of moving the camera directly, make an empty game object that it will move and make the camera a child of it
and just rotate it on its local x axis.
Use the raw accelerometer value to Lerp between min and max rotation values, then use SmoothDampAngle to
move the current camera rotation gradually toward the target angle.

Thanks, now I am going to try it

I want to ask you, if you don’t mind, that the SmoothFollow component needs to be attached to the camera or to the parent gameobject.
I don’t want that the camera is doing the smooth follow, and it is rotated opposite of the gameobject, then the SmoothDampAngle rotates it opposite.
Where i need to attach SmoothFollow, camera or gameobject?
Thanks I am asking you because I can’t play the accelerometer on the computer, so I have to build the complete.