There are many ways of controlling mouse pointer using atmega328p, and I find using a python script and an arduino best and effective one because of the following reasons:
1) Python is a common language and comes pre-installed in almost all LINUX distros.
2) Using python script makes this project compatible to cross platforms, as no fancy software is needed.
3) Using an arduino saves me from the trouble that goes into making the whole circuit and then connecting it through a USB to TTL converter.
I’ll be using two non-standard libraries viz. Pyserial and Autopy both of them are freely available and easy to install, just like any non-standard library. Accelerometer that I’m using is ADXL335, it’s a triple axis accelerometer.