Schupp icon

Untitled

Schupp | PRO | 09/18/21 10:00:49 PM UTC | 0 ⭐ | 345 👁️ | Never ⏰ | []
text |

440 B

|

None

|

0 👍

/

0 👎

int readycount = 0;
String inputString = "";
 void serialEvent() {
    while (Serial.available()) {
      // get the new byte:
      String suche = "SYN";
      char inChar = (char) Serial.read();
      if (inchar == suche.charAt(readycount))
        readycount++;
      else
        readycount = 0;
       if (readycount > 0)
        inputString += inChar;
      if (readycount > suche.length() - 1) {
        match = true
      }
    }

Comments