Hi,
I packaged the ps2 mouse code into a library with examples for mouse and keyboard. Look for it in the playground.
Enjoy,
Hi,
I packaged the ps2 mouse code into a library with examples for mouse and keyboard. Look for it in the playground.
Enjoy,
Hi Chris,
Thanks for the Arduino PS/2 Lib.
I tried it with a very cheap PS/2 optical mouse ("Sweex PS/2 Optical mouse" of ?4,95).
Unfortunately it didn't work with the lib out of the box... I figured out that the read routine reads out the first data bit before it starts the for() loop for the data bits. So, the value it reads is one pos. bit-shifted to the left... I got rid of the delayMicroseconds(50); and delayMicroseconds(5); (after the clock & data lines are pulled high, at the beginning of PS2::read()).
And then it worked again...
I read the PS/2 specs and it says the lines should be pulled at least 50us, but I guess it's not the host that should be taking care of that..... Or?
Could you test out if your ps/2 device also works without the delays?
Regards,
Martijn