Roblox Windows 8.1

Hello i have an controller with 8 buttons an 1 incremental encoder and i want to connect it to my android headunit. I came as far as seeing the button i press in serial monitor, however i have no idea how to code the encoder so i can turn up and down my volume.