Parsing a message through serial using photon's TX/RX pins

Have you read this tutorial?