accelerometer programming

Exactly, which I why I made a pan and tilt camera mount for my RC truck and used that exact method.