help please

i wanna to know how can i use the optical mouse as position feed back in details quiclu please

All the mouse really consists of are two encoders, one along x, one along y. Wire both of them (to dig IO, set to in) and then set up an interrupt to count their ticks. Figure out how many ticks/inch or ticks/foot or there are (drive the robot 10 feet, and have the robot printf the ticks).

Then use that data to tell the robot to go n ticks. If you only want to travel along x, then use the y axis as “error”, and if the robot picks up travel along y, have it autocorrect.

Did that make sense?

i wanna know how can i put the mouse and get its power

i wanna know also the circuits contact with the mouse

i wanna know also the circuits contact with the mouse

Unfortunately, I am not familiar with which pins do what on a mouse. You should probobly either contact a manufacturer or dissassemble an old one to figure out what goes where. You will need to definately wire up the power (prob 5 volts) and ground. There should be 2 digital lines for the encoders, and (at least) 2 digital lines for the clicks (maybe one more for the wheel). You will not need to use the clicks or the wheel, so do not wire them.

To test, check for continuity or resistance through the mouse as you move it back and forth, and see if the line ever reads high.

It wont be easy. I know (at least) one team used a mouse, so they may know better than I do.

Depends what kind of mouse too. A PS/2 Mouse just has a Data, Ground, Power and Clock lines (source: Wikipedia).

If its USB there are four pins: Power, Ground and Data+, Data- (source: Pinouts.ru).

So either way I don’t think its as simple as just see which lines go high, I’m pretty sure its all encoded as pulses along the data lines.