D devpialkt Member Licensed User Longtime User Dec 9, 2018 #1 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 } } }
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 } } }
Erel B4X founder Staff member Licensed User Longtime User Dec 9, 2018 #2 Start with reading the data with AsyncStreams. Upvote 0
D devpialkt Member Licensed User Longtime User Dec 9, 2018 #3 finally, i found 2 links that solved my problem with keyword "AsyncStreams" : https://www.b4x.com/android/forum/threads/tool-external-serial-connector.65724/#content https://www.b4x.com/android/forum/threads/strings-and-bytes.66729/#content Thanks Erel https://imgur.com/a/TFHJX8B Upvote 0
finally, i found 2 links that solved my problem with keyword "AsyncStreams" : https://www.b4x.com/android/forum/threads/tool-external-serial-connector.65724/#content https://www.b4x.com/android/forum/threads/strings-and-bytes.66729/#content Thanks Erel https://imgur.com/a/TFHJX8B