changed speed control, fixed device port issue for RPi