Splitting serial string

Hi all,

can someone point me into the right direction regarding splitting a string that comes in through the serial port?

I want to send a string like "W,0,26" or "R,1" to the arduino, and depending on the string, take different actions.

Thanks in advance,
EriSan500

I've seen two things mentioned...

  1. scanf
    http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1257423474
    scanf site:arduino.cc - Google Search

  2. Hand-coded parsing...
    parse serial data site:arduino.cc - Google Search

You might want to research strtok(). It's available to Arduino sketches.

-Mike