HC05 module connected with Android application

Newbie here ,

i am working on a simple project for my college with arduino and android commmunication. All i want to achieve is a simple communication between arduino bluetooth module and android application. On my code i have put two if conditions and two Serial.println. For example if FIRE variable is HIGH then Serial.println("Fire is detected" , by the same token if FIRE variable is LOW then Serial.println("No worries"). How can i simultaneously print on the android application the same message ? Please if someone could guide me which commands i need to place in my code , i'd be thankful.

I have paired the HC05 with my smartphone**

Showing us your actual code so far might be helpful.

#include <SoftwareSerial.h>

SoftwareSerial bluetooth(8,10); //RX,TX

const int buzzerPin = 9; // BUZZER PIN MODULE
const int flamePin = 4; // FLAME SENSOR
int red_led = 12; // RED LED PIN 12
int green_led = 13; // GREEN LED PIN 13
int Flame = HIGH;

void setup()
{
bluetooth.begin(9600);
Serial.begin(9600);
pinMode(buzzerPin, OUTPUT);
pinMode(flamePin, INPUT);
pinMode(red_led,OUTPUT);
pinMode(green_led,OUTPUT);
Serial.begin(9600);
}

void loop()
{
Flame = digitalRead(flamePin);
if (Flame== LOW)
{
digitalWrite(green_led,LOW);
Serial.println("Fire Detected!");

tone(buzzerPin,1000);
digitalWrite(red_led, HIGH);
delay(200);
digitalWrite(red_led,LOW);
delay(200);
noTone(buzzerPin);
}
else
{
Serial.println("No fire ");
noTone(buzzerPin);
digitalWrite(red_led, LOW);
digitalWrite(green_led,HIGH);
}
delay(1000);
}

use

bluetooth.println("this message goes to smartphone");

to send the message back to your phone
you're going to need an app or something that talks to arduino over bluetooth, to receive the message

by the way, you need to deploy 'flags' in your sketch or else the system will send messages indefinitely so long as 'flame' is detected

Firstly , thank you for your immediate response.

I have downloaded the Serial Bluetooth Terminal application from playstore https://play.google.com/store/apps/details?id=de.kai_morich.serial_bluetooth_terminal , do you think it's fine for my project ? Also can you explain me how to put those flags that you told me in the sketch ? Sorry for my amateur skills in programming but i am still learning.

Thank you in advance.

Fuji,

The serial terminal will allow you to send text to your bluetooth and display text from the bluetooth. It will help you.

You cab also get a bluetooth terminal program for your PC/laptop from the Microsoft store. That's also useful.

You should explore the MIT Appinventor site. There are many examples of Arduino-bluetooth apps.

Thank you very much , i made it and it works.