B4R Question How to convert this code to read Serial.readString();

devpialkt

Member
Licensed User
Longtime User
Hi All,

i have problem to convert this native arduino codes as shown below.
my board based on wemos D1 R1

Thanks

B4X:
void loop() { 

  if (Serial.available() > 0) {
    String incoming = Serial.readString();

    if (incoming.indexOf("{")>=0 && incoming.indexOf("}")>=0) { 
      Serial.flush(); 
      //saveData(incoming);
      //do something here
    }
 
    
  } 
 
}
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…