Make a protocol to crontrol motors

Have a look at Serial input basics - updated

It will show you how to send serial data in a format that can be parsed (decoded) when received.