I am making a device in which when the button connected to an Arduino chip is pressed, a message is sent to a person with a custom message and my current location. As I use the register block, my app crashes as I connect with my chip.
I am a beginner with app development, so it would be great if anyone can help me out of this.
Credit to you for your effort. As a beginner, part of the problem is you have "bitten off more than you can chew" - in other words, you have not built some simple, tiny Projects first to get an understanding of App Inventor, BLE and Arduino.
It's so difficult to help you because your block code has a lot of errors. We haven't even seen your script (Arduino Sketch) yet
However, right at the top of the pile of questions is this: What is the purpose of your App? Is it just to learn more about coding Apps + Hardware or do you want it to be viable, something to at least share with friends and family? I ask because BLE (and Classic Bluetooth) has very limited range - maximum is about 100 metres in a perfect environment. Even at max range, you wouldn't need to send a message to anyone - they will probably see where you are....or perhaps you are riding a bike or driving car or something, the Arduino is an attachment to the vehicle, so you will be close to it, your phone receives the data via BLE and sends an SMS message (not a message via BLE). Yes, that's it?
By the way, your Blocks are reading Bytes, not Integers, but in this scenario text (C String) or Float would be the types to use - depending on the location data i.e. if it is just floats or it's float values embellished with characters..Lat1234.56333 Lng4321.65444
The purpose of the app is to be an sos message sending app, such that when someone clicks the button on arduino chip, 1 person get the sos message with the location co-ordinates. I have tried using every register block but it always crashes, no matter which one I use.