I am trying to make the arduino receive and process HPGL commands from the serial port. How can I break a single command into multiple parts.
For example if the arduino gets: PU50,50;
i want it so store it as a variable:
char* val = "PU50,50;" ;
Then I want the arduino to extract the first 2 letters, that is "PU" and store it as a separate variable, then go on and extract the first coordinate that is "50" and then the second coordinate "50" and store both of these as a separate variable. How can i do this?