tweaked output to work with leonardo-bridge
first working version of the encoder