first implementation of joystick reading