Initial commit with code from http://robofreaksindia.wordpress.com/2013/04/01/the-code-behind-dmouse/