Advertisement
TolentinoCotesta

Untitled

Dec 16th, 2018
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. String inputString = "";  
  2.  
  3.   while (Serial.available()) {    
  4.     char inChar = (char)Serial.read();
  5.     inputString += inChar;
  6.  
  7.     if (inChar == '\n') {
  8.        if(inputString.indexOf("10") >-1 )
  9.           // etc etc
  10.        if(inputString.indexOf("11") >-1 )
  11.           // etc etc
  12.        if(inputString.indexOf("12") >-1 )
  13.           // etc etc
  14.  
  15.        Serial.println(inputString);
  16.        inputString = "";    
  17.     }
  18.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement