Hello / Good evening, I am currently in the final S (in france) project and I am starting on arduino. I managed to pair my arduino UNO card with my phone using the code attached:
#include <SoftwareSerial.h>
SoftwareSerial BTSerial(10, 11); // RX | TX
void setup()
{
pinMode(9, OUTPUT); // this pin will pull the HC-05 pin 34 (key pin) HIGH to switch module to AT mode
digitalWrite(9, HIGH);
Serial.begin(9600);
Serial.println("Enter AT commands:");
BTSerial.begin(38400); // HC-05 default speed in AT command more
}
void loop()
{
// Keep reading from HC-05 and send to Arduino Serial Monitor
if (BTSerial.available())
Serial.write(BTSerial.read());
// Keep reading from Arduino Serial Monitor and send to HC-05
if (Serial.available())
BTSerial.write(Serial.read());
}
I now want to ensure that when a condition occurs and that the card sends a specific message via the Bluetooth module (here: "it's time to take your medication").
I come to ask for your help because I did not find answers to my questions at all.
What terms should be used?
Thank you in advance for your answers.