PS2 mouse interfacing problem - no XY -

Hi all,

Got Duemilanove wired up to a PS2 mouse as per 'Ps2mouse' in the Arduino Playground (can't post http link cos am Noob..)

Am doing it all stock, same wiring, no alterations to code.

It's reading the left & right click switches ok, so pretty sure I have the wiring correct & PS2 interface is working OK(??) but :

Am just getting zeros on the X & Y -

Through the serial PC monitor I'm getting:

.
.
.
1000 X=0 Y=0
1000 X=0 Y=0
1000 X=0 Y=0
1001 X=0 Y=0
^ = 'left button down' (my comment)
1000 X=0 Y=0
1000 X=0 Y=0
.
.
.

1000 X=0 Y=0
1010 X=0 Y=0
^ = 'right button down' (my comment)
1000 X=0 Y=0
1000 X=0 Y=0
1000 X=0 Y=0
.
.
.

& so on, - not getting any X or Y values..

??

--

Regs,

gmc

Try taking the mouse ball out and using your fingers to turn the encoder shafts (because they might be stuck). Also could you post a picture of your setup.

no luck so far - have taken two (optical) mice apart & am looking to do some soldering & try this:

http://www.martijnthe.nl/2009/07/interfacing-an-optical-mouse-sensor-to-your-arduino/

the sensor they have is::

http://www.google.co.uk/url?sa=t&source=web&cd=1&ved=0CBcQFjAA&url=http%3A%2F%2Fwww.avagotech.com%2Fdocs%2FAV02-1184EN&ei=C5xzTNfdNoOQjAfXhtHtCA&usg=AFQjCNFsirmRhYfpECYUMfn_aT-6TnSTHA&sig2=bPXeM4JVGN2wv4fk4PBvSA

--

BTW - going back in time - early 80s - I can remember Byte magazine had an advert for 1st (Xerox?) mouse - price was umm..

$500.

--
Am enjoying playing around with Arduino - I managed to replicate this - quite fun:

gmc

Ok, done soldering & done d/l from the estimable martijn: http://www.martijnthe.nl/2009/07/interfacing-an-optical-mouse-sensor-to-your-arduino/

but get a strange error in compling - '

error in math.h 439: error - expeced ')' before 'double' -

I re-loaded the whole Arduino software over my existing installation in case of accidental corruption, but it still comes up with the same error.

(furrowed brow..)

gmc

mankind had a need for a omnicient, omnipresent master to feed & comfort themselves - so they made the internet.

What is the line of code the arduino compiler highlighted when you got this error?

The compile error in math.h surely has to point to a problem elsewhere - can't believe there might be a prob in such a core file.

Gotta say am finding it quite frustrating that the Arduino wrapper treats us gently in the IDE, then throws us to the wolves in the (non 'CTRL-C'-able - not copyable) error msgs...

gmc

You CAN copy your code, and paste it here (using the # button). Then, those with more experience (or patience or both) can look at it, and maybe even tell you what is wrong (and how to fix it).