Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
Druhi Chakraborty
Published © GPL3+

Bluetooth Obstruction Sensor with Android app

This project is used to provide the distance of your intruder on your phone app via Bluetooth. Using MIT app inventor for the app making.

BeginnerFull instructions provided340
Bluetooth Obstruction Sensor with Android app

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Breadboard (generic)
Breadboard (generic)
×1
Female/Female Jumper Wires
Female/Female Jumper Wires
×1
HC-05 Bluetooth Module
HC-05 Bluetooth Module
×1
Ultrasonic Sensor - HC-SR04 (Generic)
Ultrasonic Sensor - HC-SR04 (Generic)
×1

Software apps and online services

Arduino Web Editor
Arduino Web Editor
Arduino IDE
Arduino IDE
MIT App Inventor 2
MIT App Inventor 2

Story

Read more

Schematics

Circuit Diagram

intruder_tracker_01JypBueVh.png

Code

bluetooth_Ultrasonic_Sensor

C/C++
//by Druhi Chakraborty
#include <HCSR04.h>
#include <SoftwareSerial.h>

HCSR04 DS(9, 8);//initalizing trigPin and echoPin

SoftwareSerial BT(1,0);//initialing RX and TX Pins

void setup(){
  Serial.begin(9600);
  BT.begin(9600);
}

void loop(){
  int s=DS.dist();
  if (s>0){
    s=0;//sensor gives -ve if the object is out of range
  }
  Serial.println(s);//prints the distance on seril monitor
  BT.println(s);//sends to the transmitter
  delay(500);
  //an interval of 500ms in order to prevent trigger signal to the echo signal
}

Credits

Druhi Chakraborty
1 project • 3 followers
I am student of class 10. But I want to go to MIT and I financially cannot so I think I have to try even harder. Am from India though, So...
Contact

Comments

Please log in or sign up to comment.