How to split a string into substring Arduino
Import the string.h library by adding #include &lt;string.h&gt; on top of your sketch, in order to use the strtok() function.
Checkout the usage example of strtok() here: http://www.cplusplus.com/reference/cstring/strtok/?kw=strtok