Created
December 16, 2017 15:26
-
-
Save smetronic/c0d4fdb68adfd859d09af15328e46e9c to your computer and use it in GitHub Desktop.
ATMega 328p: Read characters after keyword
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void setup() { | |
Serial.begin(9600); | |
String stringValue; | |
String stringValue1; | |
String stringValue2; | |
stringValue = "ReadData: 1997"; | |
int index = stringValue.indexOf(':'); //keyword | |
stringValue2 = stringValue.substring(index + 2); | |
Serial.println(stringValue2); //1997 | |
} | |
void loop() { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment