Need help with motor control

arduino is receiving data from visual basic wirelessly,
and i want the robot go forward when i hold the key "W" and stop when i release it.
how can i do that, can anyone help.

Case statements.

in arduino code?

george221:
in arduino code?

Have a look here, then give it a try and post an update.

You should break up your problem into simpler parts, solve each one, then combine the solutions.