Dice shaking (mobile)

Hello everyone!

“i just want to add a force to an object in a physic 3d world according to accelerometer value changes. This is the main problem.”

background:

I would like to create a dice shaking game. The user shakes the mobile device and the 3d dices on the screen roll around. That’s all. I have no idea for now about how to realize this, surely i’ll have to use physics and forces and make them related to accelerometer values. Anyone can suggest me some code to start from or something i can read? It seems there’s no much documentation about this particular case on the web. I’ve only found this question
http://answers.unity3d.com/questions/53751/shake-object-on-iphone.html?sort=oldest but the solution doesn’t explain much.

vector3 forward = new Vector3(Input.acceleration.x,Input.acceleration.y , Input.acceleration.z);
rigidbody.AddForce(forward,ForceMode.Acceleration);