Skip to content

UltraMegaPhil/SerialTrackball

Repository files navigation

SerialTrackball

Arduino project for reading data from a serial trackball mouse.

In this implementation, the serial data is also converted into a mouse data packet for transmitting to a Adafruit Bluefruit EZ-Key, but this is not necessarily the only application (one other application I can think of is using a serial mouse/trackball on an Arduino-powered robot for dead-reckoning/positioning).

This code has primarily been implemented for a Microsoft Ballpoint Serial Trackball, which uses a semi-standard version of the Microsoft Serial Mouse protocol (except it has an extra byte). The code was also tested on a Logitech Trackman trackball and found to be working on that too.

Working example of this can be seen in my RetroBox arcade stick here.

For the EZ-Key application, two serial ports are required - one for reading from the serial mouse, and another for talking to the EZ-Key. To achieve this, the AltSoftSerial library is required.

Circuit Diagram

EZ-Key circuit diagram

Tips

As you will see in the diagram, pin 4 on the RS-232 port is wired up to a 5v line. This is because the serial mouse requires 5v to power the circuitry inside it. Both the Logitech Trackman and the Microsoft Ballpoint seem to use the DTR line for this, but there seems to be mention online of other devices which take it from a different line, so YMMV.

About

Arduino sketch for reading and decoding serial mouse data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages