Car Alarm

The purpose of the project is to simulate the advanced car alarm system with a raspberrypi.

94
Car Alarm

Things used in this project

Story

Read more

Schematics

photo_2018-02-05_23-12-20_z7kYrLVoxc.jpg

The first module is the Impact Module. This module is blown sensitively and is cut off as soon as the vibration and shock of the output signal is broken. It has four bases That one vcc gnd do correspond to the voltage and ground and the signal and( ao ) this base is also not used.
Module two is a broscher. This module has a positive base to connect to the signal. There is a ground base that connects to the ground.
There is a third module of the camera that connects directly to the raspberrypi and activates and captures a specific command.
The final part of the robot is a telegram that sends a camera shot image to a robot that has a specific token and a special chat id that distinguishes this robot from other robots.

Code

Untitled file

Python
The project initially connect the (do) to the (gpio6 ) base, which in our code is the input of our signal that is interrupted by the signal to the module. In the next section, we connect the signal to the (gpio17) base, which is defined as the output of the first module when it comes to the impact module The blow has arrived The signal is cut off.
And the buzzer beeps (for 5 seconds, inside the time code), then the camera takes a picture of the camera and takes the camera and sends an order to save the photo to that address. The next command is to send the picture to the telegram, which is an chat id, chat id for the robot, and the part of the image is the same as the one we sent to the camera. As soon as the picture is taken to our robot telegram we will be sent.
Our robot's other functionality is that we can send a command \photo to the robot with a photo camera and send it to us. For a telegram robot, we need to install the necessary libraries.
import RPi.GPIO as GPIO
from picamera import PiCamera
import teleport
from time import sleep
camera = PiCamera()
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup(17,GPIO.OUT)
GPIO.setup(6,GPIO.IN)
GPIO.output(17,GPIO.LOW)
bot = telepot.Bot('token')
    if command == '/photo'
            camera.capture('/home/pi/Desktop/1.jpg')
            bot.sendPhot(chat_id,open('/home/pi/Desktop/1.jpg','rb'))
state = True
while 1:
    if  GPIO.input(6) :
        bot.message_loop(handle)
        GPIO.output(17,GPIO.HIGH)
        sleep(5)
        GPIO.output(17,GPIO.LOW)

Credits

Fateme Rabbani

Fateme Rabbani

1 project • 6 followers
fateme zaboli

fateme zaboli

1 project • 1 follower
Ehsan Aerabi

Ehsan Aerabi

18 projects • 60 followers
Researcher on IoT and Embedded Systems
Erfan Saghabashi

Erfan Saghabashi

1 project • 22 followers

Comments