Git Product home page Git Product logo

alarm-project's Introduction

Alarm-Project

Introduction

This project was created for my embedded programming class. In this class, we learn how to write embedded programs with a Raspberrypi model 4B with the python programming language.

Goal

Create a graphical user interface to interact with a basic alarm system.

My Image

How it works

We have a circuit with two LEDs - one red and one yellow - connected to the Raspberrypi GPIOs and a pull down resistor with two wires to simulate the magnetic contact of the door.

When both wires are connected, we read a logical value of 1 at the GPIO pin the pull down resistor is connected to and we read a logical value of 0 when they are disconnected.

Our alarm system is only armed after entering the right code and making sure both wires are connected at the end of the 10 seconds. This delay is for the users to have the time to leave the house before the alarm system is armed. When the system is armed, we have the red LED on and the home owner receives a message text letting them know the system has been successfully armed.

My Image

My Image

My Image

After both wires are disconnected, a 10 seconds delay is started to give the user the time to enter their code and avoid the alarm to be triggered. If the right code is not entered within the 10 seconds following the disconnection of both wires, the alarm is triggered and the home owner receives a message text letting them know the alarm was triggered at home.

My Image

My Image

Usage

Update python version to v-3

Install pygame with the command : pip3 install pygame

Install the twilio api with the command : pip3 install twilio

You will need a trial twilio for message texts alerts.

You will also need to generate your url for the weather conditions on this free weather API : https://open-meteo.com

Make sure to use your location to get accurate weather conditions.

alarm-project's People

Contributors

natelufuluabo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.