Sending realtime data EMG to my Android via BluetoothLE

Greeting sir, can I asking to you about sending realtime data to my Android BluetoothLE
I have trying but there is an error for sending realtime data. Maybe you can help for some solution?
And for the last, please don't make this forum first because I'm not ready yet :smiley:
This is my .aia and .ino files sir
LED_Control_6.aia (616.7 KB)
LED_COBAK6a.ino (8.2 KB)

Hi Muhammad

The reasons why we want Forum First:

Please do not private message the Power Users directly unless invited to.
1) We are a small team collectively supporting thousands of Users
2) The person messaged could be unavailable for days or weeks and the message left unread.
3) By keeping the discussion on the forum, there are many people from all around the World (different time zones) who can potentially help you, not just the first responder, who may be unavailable. Plus, there is often something that many forum members can learn by reading the posts.

I can make an exception to the rule but I'm not available until this evening (UK time) at the earliest.......

I'm so sorry sir, I didn't think that far :disappointed_relieved:
And because I have sent a message also to Mr. Juan Antonio, so I'll be waiting for a reply from him to be able to open a new forum or not
Once again I'm so sorry sir, if I open the forum I hope for your help again. Have a nice evening :blush:

Hi Muhammad

What is the purpose of the data? What happens (or should happen) at the receiving end?

There is no purpose at all sir, in my project the EMG graph is only for monitoring.

Just a note on-the-fly: best practice is to not hide/show components like buttons - imagine if that happened on your car dashboard - totally confusing!

SCREEN1, SCREEN2 and CONTROL are buttons and should be identified as such.

So, the data for the graph should be from the Arduino Nano? The Sketch LED_COBAK6a.ino does not send anything, it only receives.

I might add at this point that there is a recent beta update of the BLE Extension to work with Android 12:

I think your Clock1 timer Block is an attempt to receive data (x,y?) from the Nano?

The values should be sent together in sequence from the Nano, using one UUID Characteristic. A clock timer is not required for real-time streaming, the BLE extension has a block for that, you just have to register it first.

For example: (note, I'm not familiar with Juan's Extension)

I have read about it sir, in my opinion there is no change in android 12 as said:

Honestly, me too sir. I don't understand about his post

Well, let me try my best sir

I have tried sir, but on my Android display the graphics don't appear

And this is my blocks

I think you will need Juan's advice on how to populate the graph. App Inventor has a built-in Chart component now, you might like to give that a go.

I see your values are now correctly produced in the .ino - are they being correctly sent to the App? Test by sending the values to a label in the App.

I suggest this should now become a Forum Topic.

I hope so sir, but I have asked for permission

I have just changed the Topic status.

ok sir, I hope to get a solution soon

Couple of important things Muhammad:

  1. We can't read your blocks to the right of the image and they are the ones we need to see.
    EDIT: It might help if you first used 'Clean up Blocks' to arrange them in a single column.

  2. We need to see your modified .ino file

Your Arduino BLE must send a String every second, example:

Your App must receive that String in a Label, example:

Do I have to activate the clock first, sir?

You don't need a Clock in the App, just ensure that your Sketch (Loop) sends the values every second. Use elapsed milliseconds like this:

//ArduinoToApp.ino  02/03/2021 02:38:48

//Fake data stream to demo elapased milliseconds timing

unsigned long lgUpdateTime;

void setup()
               lgUpdateTime = millis();

void loop()
	           if(millis() - lgUpdateTime > 1000)           //Loop approx every 1 second
                         lgUpdateTime = millis();

                         //Bluetooth to App
                         Serial.print("|");      //Value delimiter
                         Serial.println();        //This empty last line tells App "End of Data" = Ascii LineFeed Char Number 10

Your content is entirely different, this just shows how to use elapsed milliseconds.

How about this one, sir?

I just type println, is that not enough, sir?

I have tried sir, but an error appears like that
and this is my blocks