Serial Programming code help

I don't see any of your code posted anywhere?!

Why not just use a slider? Use something like onChange to send command to Arduino. If you worry that is too frequent, then have a timer saved in the onChange method. Save system time to the timer after you send a command. Next time it runs, compare and only send command if it has been say 50ms since last command was sent.