I'm trying to build a usb slider interface that can control the positions of several servo motors powered by an Arduino. My goal is to have each servo be controlled by its own slider, and that I can move multiple sliders at the same time to control multiple servos at the same time.
The problem is that the quicker I move one slider up and down (0-127-0) the data read by the serialRead (serial running 9800 baud) in Arduino eventually gets mucked up. It will read a clear scrolling signal from 0-127 and back if I move it slowly, but if I do it fast it will read combined points (12485) or nonsense data points (-15) in the Arduino reader. If I do two or more sliders at the same time, it's even worse.
Is there and object, or a system of objects I can use to put the numbers from multiple sliders into that will slow down all the incoming messages and output them at a speed that reads properly over the serial port to the Arduino (9800 baud I guess)?
It doesn't have to read the backlog of data: I don't need ever slider tick to read perfectly. Rather I would like it to read the stream of data only often enough (at a rate) that it will be able to be send over the serial port without collecting the errors I describe.
Each slider has their its own range, and a "," as a separator, which are parsed to send to the different servos.