Sending data received from Arduino via bluetooth with time to Google spreadsheets from MIT app

I'm unable store my data with time in the first column and data in 2nd column
blocks (3)
blocks (4)



Dear @maruthi,
for sure the data (not the date! ) is not shown because when you tru to read the incoming buffer the second time :
image
it has been already emptied by the first reading:
image
Moreover, as you can read in many other posts, the best way to read incoming data from the BT is to use this mode:
image
In this way, the app will wait until a Linefeed character (i.e. 10 dec or 0x0A hex) is received, So no data are lost due to a (possible) delay during the transmission from the server (your Arduino board).
In the screen1.initialization block you shall set:
image
To accomplish this feature your LAST, only the last, sending from Arduino shall be done with a .println(); any intermediate sending shall be done with .print();
More detailed instruction can be found here:

Cheers

In addition to the advice from @uskiara , be aware that asking for BlueTooth input immediately within the same event as where you sent a request 'R' will not have data available (unless you want to block further execution until the data arrives, which is generally a bad idea because it freezes the UI).

If you are expecting different Bluetooth messages resulting from different requests ('R', 'T', 'H',...) keep a record of your last request in a global variable, to help you know what to do with the incoming message when it shows up.

1 Like