EMG sensor App to send data to google sheet

and...
what does global Receive_data look like now ?

It does not display data. I am thinking because i set the delay to 5000milliseconds. I have changed back to 300milliseconds and it works. I guess the emg sensor reading has to be lower it than the bluetooth.

This what I get on the App.

OK try just grabbing the last entry:

should return a list with the two values of the last entry

OK. I have done that and it works now. How to send the data to google sheet.

I now want to send the sensor values to the google sheet. Such that when i click on the record button it start sending the signals to google sheet and when i click stop button, then it stops sending the data to google sheet.APP IMAGE2|384x500

Something like this:

I would probably turn things around, use the clock to fetch the value then send to google sheet

Clock timer set to 10000ms ?

ok.. i will just try this out now.

You might want a timestamp ?

You can probably get this as a third value from your arduino, or use the blocks to provide when the data was sent to google sheet ?

The number of Bytes call is wrong. Do it like this:

Tell the App what the end-of-Data mark is: (Unfortunately named Delimiter Byte by App Inventor)

Hello, I just want to clarify something here. I have used a label which displays the value already exist. I already used a label and i have this. Do i have to use a list again in again in the above image..?

Example Project that sets values to Labels, but of course you can change that to whatever suits best:

BT_Basic_Setup_ReceiveMulti.aia (8.4 KB)

Example of elapsed milliseconds timing:

//ArduinoToApp.ino  Chris Ward 29/10/2019 21:56:22

//Fake data stream to test App. Classic Bluetooth

//vars
unsigned long lgUpdateTime;
int iVal = 50;

void setup()
{
       Serial.begin(9600);
       lgUpdateTime = millis();
}

void loop()
{
	  if(millis() - lgUpdateTime > 6000) //Loop approx every 6 seconds
      {
           lgUpdateTime = millis();

           if (Serial.connected())
           {
                     //To App via Bluetooth
                                  iVal = iVal + 2;
                     Serial.print(iVal);
                     Serial.println();  //This tells App "End of Data"
                                        //= Ascii LineFeed Char Num 10
           }
      }
}

Yes, that's just a means of separating the values easily. You can display the values in a List View by first adding them (as a single string with labeling as required) to a Blocks List and then updating a ListView Component (on Screen List) with that Blocks List.

Thank you for the feedback. This is very much appreciated. Now my problem is how to send the sensor data to google sheet. That is important to get the essential data from muscles movement of patients. Please can you help with that?

That's TimAI2's area of expertise :grin:

1 Like

Where variable reading is a list of two values:

[43.99,9.0]

Ok.. I will send a message to TimAI2. :smiley:

Yes please.. I tried this but it return error message.

This the code block..