Hi everyone,
I am trying to get the data from a BLE device running Arduino code. The device sends the data using the bleserialwrite function. However, the data coming from the app after recieving the values is merged.
My Arduino code is as follwoing:
bleSerial.print("V");
delay(500); bleSerial.print("I"); bleSerial.print(I); delay(2000); This data is sent every 2500ms by the BLE device. However, when this is data is recieved by the app, it is writing to a file as following (535V4844I65535V4848I) My question how can I recieved data just as (V4844I65535) without the extra values? Why app inventor is fetching extra values. This problem is not there I think in the Classic Bluetooth Devices. Please let me know, how to improve my situation. Thanks in advance. P.S: I read the previous threads in this forum but they address mostly the classic bluetooth devices which doesn't use the StringsRecieved function. |
I tried your suggestion. It seems not working. Now my sensor reading on the app comes as (V200I400 V30I400). So the only difference is that the bleSerial.println at the end added a space between two values. I don't think it's the problem on the Arduino part, as the normal serial port is outputting values as expected. It's only the bleSerial that's not working. So, I think it's the app Inventor part. Please let me know if there's a way to troubleshoot this issue.