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

Similar threads

B4R Tutorial HC 05 Classic Bluetooth
B4A Code Snippet [B4X] Bytes To File
B4R Code Snippet JSON Parsing
B4R Tutorial Strings and Bytes
B4R Tutorial [tool] External Serial Connector

devpialkt

Member
Licensed 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
    }
 
    
  } 
 
}
 
Top