Streaming control info to arduino over serial

I am trying to control motors from an arduino by streaming motor control values from my computer to the arduino over serial. I was wondering what the best approach is for this. Should I be concerned about timing issues or filling up the entire serial buffer? Any advice on how to approach this problem would be helpful?

This is my current approach:
arduino code-
computer code-

Have a look at the examples on serial in the IDE .
If you are using code from elsewhere you need to understand how it works and you can then alter it to include your serial commands .

If you wish people to study your code please post it here.

I don’t understand what you mean by “streaming motor control values”. Why would there be any need to send values more frequently than about 5 per second?

Have a look at the examples in Serial Input Basics - simple reliable ways to receive data. There is also a parse example to illustrate how to extract numbers from the received text.

The technique in the 3rd example will be the most reliable. It is what I use for Arduino to Arduino and Arduino to PC communication.

You can send data in a compatible format with code like this (or the equivalent in any other programming language)

Serial.print('<'); // start marker
Serial.print(','); // comma separator
Serial.println('>'); // end marker


You will only fill up your Serial input buffer if you don’t read it fast enough.

You will only fill up your outgoing Serial buffer if you place data into it faster than it is transmitted.

Both you can easily prevent with proper coding.