What I am here to ask is how i can use an optical mouse's x and y coordinate tracking to develop a grid so that points can be programmed for the robot to follow.
You need to elaborate more on this.
But, first, are you able to read the optical mouse's coordinates? Do the value make sense to you?
Where do you plan to define this grid? For what purpose?