How to use accelerometer to control the motors

I am working on the accelerometer sensors recently. I can see the signal from the example code when i move the sensor to a certan angle. So now i want to control the motors by the accelerometer. Could anymore help me please? I really want a complete code or give me some hint how to move to next step. Thank You.

Could you explain what you are trying to accomplish? It’s not clear.


i want the motors move by the signal from accelerometer

That much I got. What are you trying to achieve? What is the goal, the purpose?


Pretend it’s doing what you want. Tell us exactly what we would see happening if we watched your robot. Give us descriptions of several different actions. Be as detailed as you can. That way we can help you make it happen.