Sending realtime data EMG to my Android via BluetoothLE

That was just a minimal test to see if data could be extracted cleanly (without ()) from the BLE data stream.

Did you actually try those blocks, using a Label of your choice?

Did you see data arrive in the Label?

Did it look like the data you sent?

If all those are true, my work here is done.

Questions about setting up BLE connections I leave to BLE experts.
Be aware you took a non-BLE Bluetooth sample and converted it into a BLE app.

Questions about how to feed data into a graph extension, I leave to you and the author of that graph extension.

If you want to use the native AI2 graph component, see

I have change it sir, and the result is the data extracted cleanly without ()

EDIT : I'm sorry if I just replied, because there is only one Arduino and my friend is still using it to retrieve EMG data so I take turns using it

The 'Strings Received' Block should be as per ABG's example.

The Button_Connect Block should be fine - but do you use a Clock Timer to allow the Scan to find all available devices?

:joy: I didn't see your last post when I commented on the previous one - so that is good news about the clean values, but what about the graph?

Have you tried the "look over there!" approach? Tell your friend to "look over there" and quickly grab the Arduino while he/she is distracted. :innocent:

Ensure you reserve time to make your App GUI look professional. Use image buttons - well defined images can be understood by anyone of any language and also they usually take less space than a text button.

yes sir I have used it

That's the question sir, I have tried but always many error :disappointed_relieved:

I will do it sir, then I will send it to this forum when it's finished

Juan has written a guide on how to use App Inventors built-in graphs function:


Don't draw, just present the data in a Label

Have you got this?

Like this sir? The data is in the label below the graph it write 791,762
I send data from Arduino using a Variable Resistor

I don't understand that sir. What I understand is that the graph is drawn from a random integer sent by the clock, am I wrong?


There is and error like this sir

This is my blocks, is there something wrong sir?

  • Use only the Label Nilai_1.
  • What do you get in Label Nilai_1?
  • You should get pairs of values, example: 675,743


Yes, that is what Muhammad's code receives from the Arduino, every 1 second. What he doesn't understand is how the data in the Label should update the graph? Apart from a typo (value2 should be index 2) isn't "KIO4_DynamicGraph1 .UpdateGraph2" the correct Block to feed the values? If not, what should he use?

Click in Click Click button

p2borrar_99H_GraficoDinamico_4_copy.aia (12.4 KB)

Your code is nearly there Muhammad, I think you can do it like this (untested, I don't have any hardware to hand at the moment):