You can only disconnect if there is actually a connection with a device.
I'm sorry sir, the text is connected.
Have you studied/tried the example Project in Post#34?
I don't understand about "A Google Security Measure" but for the location I have turned it on and I have allowed the application to turn on the location
In post # 34 I have practiced it but there is an error
but there is an eror like this image
Right, so you have connected to the device but the UUIDs do not match - they must be identical in the App and in the Arduino Sketch.
But my UUID's in my Block is match with device sir
They may seem to, but that error message is only triggered when there is a discrepancy. There might be a hidden character at the beginning or end of one of the strings, or simply a wrong character.
Actually in your case can we tell by the length of the UUID? In the Sketch you are using '180A' and '2A57' but in the App you are using 128bit (long) UUIDs.
I have connected to the bluetooth but when I press the "LED ON" button there is an error like this. What does it mean?
And for the record. I've changed the UUIDs according to my code in the Arduino IDE
Well we need to see your WriteStringValues Block.
Is the Arduino Sketch (.ino) expecting strings?
Well maybe that's the point, I'll try to change the sketch or my block
Because I see in my sketch there is no Strings.
Hello sir, sorry never showed up.
today I want to ask for this error how to solve it
this is error form my phone
Uploading: phone.jpg...
and this is error from my mit app inventor on my pc
Uploading: SS.png...
and I don't forget to upload my block.
Uploading: blocks.png...
Hello Muhammad
None of your images have uploaded unfortunately.
Oh God, I'm so sorry sir. I'm sure it bothers you a lot
I'll resend to forum, please wait a minute
Hi Muhammad
I think the error means that the Integers Received block is only receiving one value, and therefore cannot make a list from that data. Can you post your Sketch as a .ino file for us to study?
I wonder if the WriteStrings block is being fussy about its input, and will accept only a red text block '1' instead of a blue math block 1 ?
-
WriteStrings
– Writes one or more strings to a connected BluetoothLE device. Service Unique ID and Characteristic Unique ID are required. The values parameter can either be a single string or a list of strings. Ifutf16
is true, the string(s) will be sent using UTF-16 little endian encoding. Ifutf16
is false, the string(s) will be sent using UTF-8 encoding.Parameters:-
serviceUuid
(text) — The unique identifier of the service passed in the read or register call. -
characteristicUuid
(text) — The unique identifier of the characteristic in the read or register call. -
utf16
(boolean) Send the string encoded as UTF-16 little endian (true) or UTF-8 (false) code points. -
values
(list) — A list of values to write to the device.
-
Okay sir, give me a time to change my blocks
by the way thanks for letting me know
Hi Muhammad, did you sort out the UUID issue?
-
I think we need to see your App Inventor project file (.aia) too. The .aia and .ino files need to be singing the same song.
-
You should only need to send not receive.
-
We do not know the exact Arduino Model that you are using, which is critical.
You start with 'Arduino nano ble 33' but others are mentioned (There are 6 different Nano BLE 33 boards). -
We do no know the Make/Model/Android Version/Bluetooth Version of your Phone (Android Device).
-
We do not know if you have set-up the hardware correctly - a schematic and photographs of the board would help.
So please post/upload all of this information - don't miss anything out!
LED_COBAK2.ino (6.2 KB)
LED_Control_HM10.aia (159.2 KB)
That's my .aia and .ino files sir
Well, I think I have done that in this project sir
In this project I used Arduino Nano BLE 33 Sense
About my android version is 11 and my bluetooth version is Bluetooth 5.0
I took that picture from my android. So sorry if the picture is not clear
And I'm sorry if I just replied, because I have a business that I must attend to immediately