Notifier it gives an error

image
Connection has been established when connected to bluetooth. I want to receive a notification that the connection could not be established when the connection could not be established.
I did the application like this, but the application closes by itself, I am probably making a mistake.

Drag out an "else" block to your first if statement (click on the blue icon on the if statement block) and put the second notifier there. Delete the second if statement

I did as you said yes, but at this time, even if the connection is established, only the connection failed notification appears on the screen. Then comes a self-connection notification

But this only works once. Until you disconnect bluetooth with this block:
component_method (4)

If you want to detect in the app turning off the BT device or loss of range, use this method. This method will only work when you are trying to send something to a disconnected BT device, possibly also when you are trying to read.
blocks - 2021-05-02T184105.630

basbelaiki (1).aia (2.1 MB)
please look

Ok. Now describe what the problem is and what behavior you expect.

Try it:
basbelaiki (1).aia (2.1 MB)

Pokaż jeszcze swój kod dla arduino.

When I connect to bluetooth, I want to receive a no connection notification when the connection is not connected.

When you hang up with the button?
basbelaiki (2).aia (2.1 MB)

The application you made also closes after a while and the data is not coming Whatever is happening prevents me from receiving data from bluetooth and closes the application

  1. Share your code for arduino.
  2. Is there any error?
  3. You work with companion or compile APK.
  4. Record screen and share movie.

I modified the blocks to receive the character "ln" from the arduino data. Apparently in the code for arduino you don't have "ln" and the app is crashing. Add arduino code here, we will modify it and it will work reliably.

Adsız The first code I threw to you works very well, so you do not need to make changes in the bluetooth-related places. All I want is notification

Do it this way:
kambur.println(ang_x);
delay(200);

And use this aia:
basbelaiki (3).aia (2.1 MB)

So is there a way to change the code without spoiling its originality? both in the arduino and in the app invertor

I believe your original code is broken, not made with the art we teach here, and it cannot be fixed without changing what I changed. If you think it is broken, modify the data receiving block and restore it to the original one. Since you're getting into making an app, it shouldn't be difficult for you.