How to limit USB traffic PC to Leonardo

I have a servo motor that uses a Leonardo as controller. I am passing position commands from PC to Leonardo, just a few bytes per command at 1 Hz, but I see lots of traffic on the USB line. Groups of packets last 30 ms or so. Some of them occur when the PC’s python script is sleeping. How do I turn off all unneeded sources of traffic so I can update the motor position every 10 ms (assuming the Leonardo can consume 100 connands/sec over USB). How do I minimize the number of packets I am generating?


Your description of the issue is difficult to follow. How did you determine that there is excess “traffic” going through the USB line? Can you post some screenshots of that so we can see what the traffic is? What operating system are you using?

A general tip for minimizing the number of packets you generate is to make one big string or byte list with all the commands you want to send, and then write it to the serial port all at once.

You might try posting about your issue on the Arduino Forum so that your question can reach a larger community.

- Amanda