Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- oid parsing() {
- if (Serial.available() > 0)
- {
- char incomingByte = Serial.read();
- if (getStarted)
- {
- if (incomingByte != ' ' && incomingByte != ';')
- {
- string_convert += incomingByte;
- } else {
- intData[index] = string_convert.toInt();
- string_convert = "";
- index++;
- }
- }
- if (incomingByte == '$')
- {
- getStarted = true;
- index = 0;
- string_convert = "";
- }
- if (incomingByte == ';')
- {
- getStarted = false;
- recievedFlag = true;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement