[SOLVED]Arcade trackball to usb mouse help

Try the below code that maps the values (with a little overhead) you supplied from #29 to the range expected by the joystick.

When you say the Z encoder did not work well it may be because the encoder is not as higher resolution as the trackball but it might also be because of what pins you connected it to?

Deleted due to being wrong version.