Danny van den Brande
Published © CC BY-SA

Arduino/Android - BLUETOOTH Voice Panic Alarm With APP

Simple project on how to build a Bluetooth Panic alarm with SMS & call function using Android.

BeginnerProtip1 hour1,788
Arduino/Android - BLUETOOTH Voice Panic Alarm With APP

Things used in this project

Hardware components

robotdyn uno
×1
1 channel relay
×1
HC-06 Bluetooth Module
×1
Alarm Strobe Siren
×1
Jumper wires (generic)
Jumper wires (generic)
×1

Story

Read more

Schematics

Panic Alarm Schematic

Code

BLUETOOTH_voice_Alarm.ino

Arduino
This code is written for my home voice control app.
The app simply reads the bytes @ case, 1,2,3,etc.
You can control 8 relays trough your phone with this.
You can add any device you want to the relays.
/*
Author: Danny van den Brande. Arduinosensors.nl. BlueCore Tech.
This code is written for my home voice control app.
The app simply reads the bytes @ case, 1,2,3,etc.
You can control 8 relays trough your phone with this.
You can add any device you want to the relays.
 */
int relay1 = 2;
   
  byte serialA;
void setup()
{
  
  Serial.begin(9600); //Check step 2 of my instructable on how to change your HC-06 modules name and baudrate.
  //my HC-06 has a baudrate set of 9600. Your can be different. But you can change it.
  pinMode(relay1, OUTPUT);

}

void loop() {

if (Serial.available() > 0) {serialA = Serial.read();Serial.println(serialA);}
 
      switch (serialA) {
    case 1:
      digitalWrite(relay1, HIGH);//alarm
      break;
    case 2:
      digitalWrite(relay1, LOW);//alarm off
      break;    
    case 3:
      delay(100);//everything on
      digitalWrite(relay1, HIGH);
      delay(100);
    break;
    case 4://everything off
      digitalWrite(relay1, LOW);
     default:

      break;
  }

}

Credits

Danny van den Brande

Danny van den Brande

36 projects • 108 followers
"Hello world."

Comments