Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
Amaan Javed
Published

Room Intruder PC Alert (RIPA)

Bluetooth system changes screen in pc so that intruder in your room can't see what your watching

BeginnerFull instructions provided1 hour244
Room Intruder PC Alert (RIPA)

Things used in this project

Hardware components

Ultrasonic Sensor - HC-SR04 (Generic)
Ultrasonic Sensor - HC-SR04 (Generic)
×1
HC-05 Bluetooth Module
HC-05 Bluetooth Module
×1
Arduino Nano R3
Arduino Nano R3
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
Tape, Double Sided
Tape, Double Sided

Story

Read more

Code

Arduino

Arduino
#define echoPin 6 
#define trigPin 7
long duration; 
int distance;
void setup(){
  Serial.begin(9600);
  pinMode(trigPin, OUTPUT); 
  pinMode(echoPin, INPUT);
}
void loop(){
  digitalWrite(trigPin, LOW);
  delayMicroseconds(2);
  digitalWrite(trigPin, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin, LOW);
  duration = pulseIn(echoPin, HIGH);
  distance = duration * 0.034 / 2; 
  if(distance <= 84){
    Serial.println('H'); 
    delay(2000);
  }        
}

Python

Python
import serial
import webbrowser
import time
import pyautogui
from win10toast import ToastNotifier
m5 = serial.Serial('COM8', 9600, timeout=.1)
toaster = ToastNotifier()
toaster.show_toast("ATI SYSTEMS","RIPA PRIMED")
while True:
    da = m5.readline()[:-2]
    if da == b'H':
        webbrowser.open('https://www.youtube.com/watch?v=DjJjMx_YrxA&t=8s')
        time.sleep(3)
        pyautogui.moveTo(48, 374)
        pyautogui.click()
        time.sleep(1)
        pyautogui.press('f')
        time.sleep(.5)
        pyautogui.press('3')

Credits

Amaan Javed
19 projects • 4 followers
Student
Contact

Comments

Please log in or sign up to comment.