I tried to edit the first post but unfortunately I couldn't. I am including here the two files, one header file and one source file with which you can communicate with the ADNS2610 sensor.
Here is the header file Here is the source file If you have any questions or even better any suggestions for improvement to these drivers please tell me.
In addition I would like to ask people who have integrated such a sensor to their robots (spikey?

) how did they use them.
For example I managed to make the robot make perfect turns, and measure the distance travelled. Only thing I thought I could manage to accomplish and haven't managed so far is making it go 100% straight all the time. And that is because small difference to the Y axis (left-right) happen no matter what, the sensor is VERY sensitive.
Even if you make a routine which will alter motor power to turn slightly trying to keep all of deltaY at zero this will result in a very strange kind of NOT going straight motion. So I concluded that it would be better to let the robot go off a little at going straight and then calculate the off difference and correct after said distance has been travelled.
Please do share your insight on the matter
EDIT: And something I forgot. Those who have already tried to integrate an optical sensor with the robot ... do you have any idea what is the way of measurement it uses? It doesn't say anything in the datasheet.
After letting the bot run a few times I think by experimentation alone that 1000 of whatever the optical sensor is counting with is about 8cm.
EDIT2: As for those 2 files. They use a math.h. It is just another header with a power and a sqrt function. And that is only used for the function which turns the signed chars (two complements) to ints.