Person in distress can push a button on the Arduino, which sends a signal via Bluetooth to a paired Smartphone.
This signal also changes the colour of an LED on the Arduino Box.
The signal changes the colour of a button in the App (I suggest it should also play a sound).
The Smartphone User can push the button in the App to switch off the Alert.
When the Smartphone button is pushed, it sends a signal back to the Arduino Box and switches off the LED to indicate that someone has received the signal and will attend the person in distress.
Is that how your Project should work? If not, write a step-by-step as I have done here.
Create a basic application to send an app information to Arduino with HM-10.
Then another basic application to send information from the HM-10 to the app.
Here examples:
But then in the tutorial he is using the hm-10 separately, I have the hm-10 next to the shield, and in the arduino code he is declaring the RX and TX ports, in my case I don't know if I need to declare
Arduino and HM-10 must be connected.
I don't know how they are connected in your shield.
HM-10 has two data terminals TX and RX, you need to locate those terminals and check which terminals on the Arduino they are connected to.
In my examples they are connected to pins 2 and 3 of the Arduino.
I just found out that my arduino's TX and RX inputs are 0 and 1, I was able to use the second example from your site successfully, however, when I went to test the button example, I press the button and it doesn't turn red , only green, but on the serial monitor it appears that I am sending it to the app, but even so the color does not change in the app
I also tested the example of the 3 leds and I was successful, the problem was only the example of the button. Of the 3 examples that I tested, the one that declared SoftwareSerial BLE1 in the arduino code was the one that I didn't succeed.
Also, I notice that UUIDs for characteristics are used by the App code. That would normally require the same UUIDs to be defined in the Arduino Sketch, and 'Advertised' on Bluetooth. It could just be a means to an end on the App side and only Serial comms used between the App and Arduino.
I got Juan , now how do I join this button and a led? I would also like to turn the led on and off through the app, as if it were an alert, when the person pressed the button, a led would light up and it also looked like a notification on the cell phone and the alert would only disappear when I turned it off on the cell phone
App inventor does not work with Services, the app must always be active in the foreground.
There are extensions you can try to work with services, but you'll need to test them.
There are also extensions to create Notifications.
To turn on an LED from the app, you can use the examples that I have put in the HM-10 tutorial.
I think my problem has already been solved, but I only have two more questions
Where do I download the kio04 extension
and finally if it would be possible to change the message when I press the button, instead of being 0 or 1 in the app I would like it to be another type of message like "nobody is calling now" or "they need help" is it possible?