sincity337,

It would be better if you post the datasheet of the tilt sensor. Without the datasheet it would be hard to help you .

Robert