calling function in switch case

hi all,

i am a starter in arduino. i wana know how to call a function in switch case statement.
i have connected 4 motors with arduino using l293d. i want to give input via serial monitor in such a way that by pressing a key board button all motors runs in a same direction and by pressing another button all motors run in opposite direction.

please do help me out with this.

thanks and regards
yuvaraj

i wana know how to call a function in switch case statement.

Same as you call a function anywhere else.

You may find the examples in serial input basics useful.

You will probably also need to use millis() for timing (rather than delay() ) as illustrated in several things at a time.

...R