Skip to main content

Motion Detection Notifications

Motion Detection Project with GrovePi  and Hologram Nova

This project uses the Grove Motion Sensor that can be used to detect movement of people, animals or other objects. It also can send notifications using cellular network.

Things used in this project:

Hardware components:

Software Apps:

  • GrovePi 
  • Python
  • Hologram CLI

Grove - Adjustable PIR Motion Sensor - It uses passive infrared  motion sensor, which can detect infrared object motion up to 3 meters. It is an electronic sensor that measures infrared (IR) light radiating from objects in its field of view. 


Animals, people or various objects emit heat energy in the form of radiation. This radiation is not visibile to human eye as it radiates at infrared wavelengths, but it can be detected PIR-based motion detector. These are commonly used in burglar alarms.

GrovePi Zero is a HAT from Dexter Industries  that allows Grove PIR motion sensor to connect to Raspberry Pi zero with out needing soldering or breadboards. One can plug in the Grove water sensor start programming.

Grove water sensor works with digital I/O pins and it can be connected to D3 port Grove Pi Zero as shown below.
The installation instructions for Grove Pi zero and Hologram SIM are provided here .




The following program (motion_sensor_led.py) checks the water sensor output sets the text on LCD.
After execution of the above program, the status is displayed on the LCD.
 $ sudo python motion_sensor_led.py

First  a cellular connection is established using the credentials that uses a devicekey obtained from Hologram dashboard.



After reading the digital input from port D3 it determines if motion is detected and displays the message on the LCD and it also sends notification using cellular network if there is a movement.
import time
import grovepi
from grove_rgb_lcd import *
from Hologram.HologramCloud import HologramCloud


# Establish a cellular connection
credentials = {'devicekey': 'xxxx'}
hologram = HologramCloud(credentials, network='cellular')

# Connect to port D3, which as digital pins 1 and 2

setRGB(0,255,0)
pir_sensor = 3
motion=0
grovepi.pinMode(pir_sensor,"INPUT")

while True:
        try:
                # Sense motion, usually human, within the target range
                motion=grovepi.digitalRead(pir_sensor)
                if motion==0 or motion==1:      # check if reads were 0 or 1 it can be 255 also because of IO Errors so remove those values
                        if motion==1:
                                response_code = hologram.sendMessage("Motion Detected")
                                setText_norefresh("Motion Detected")
                        else:
                                setText_norefresh("")
                  
                time.sleep(10)

        except IOError:
                print ("Error")

Configure routes in Hologram dash board to send the notifications (e.g., SMS, email etc).






Comments

  1. BetMGM Launches Sports Betting at Sportsbook in Michigan - Sporting
    Sports Betting at Sportsbook in 샌즈 Michigan. BetMGM has been 피망 바카라 offering 1xbet the online sports 룰렛 게임 betting option for over 20 years. Get the best sporting100 odds on all sports and

    ReplyDelete
  2. You'll in a position to|be capable of|have the ability to} withdraw your winnings using a examine by courier, wire transfers, and crypto, to call a couple of of}. Wild Casino went through a serious overhaul in 2018, which added even more comfort to their players. You can use Mastercard, Visa, American Express, Discover, Bitcoin, Ethereum, Bitcoin Cash, Litecoin, Ripple, Stellar, USD Coin, money orders, financial institution examine, financial institution wire transfers, and P2P. There are 250+ slots supplied by RTG, Rival Gaming, Woohoo, 코인카지노 and Spinomenal, to call a couple of of} providers. Brand Spotlight provides helpful, priceless data from choose sponsors on these pages.

    ReplyDelete

  3. Your post is just outstanding! thanks for such a post,custom erp development in chennai

    ReplyDelete

Post a Comment

Popular posts from this blog

Water Leak Detection Notifications

Water Leak Detection Project with GrovePi  and Hologram Nova This project uses the Grove water sensor that can detect water leaks, spills, floods, and rain. It also can send notifications using cellular network. Things used in this project: Hardware components: Raspberry Pi Zero W or WH GrovePi Zero  Grove Water Sensor Grove LCD RGB Backlight Hologram SIM Software Apps: GrovePi  Python Hologram CLI Water sensor module from Grove system provides  the ability to detect if there is any water leak by measuring conductivity. The water sensor traces have a weak pull-up resistor of 1 MΩ and it pulls the sensor trace value high until a drop of water shorts the sensor trace to the grounded trace. GrovePi Zero is a HAT from Dexter Industries   that allows Grove Water sensor to connect to Raspberry Pi zero with out needing soldering or breadboards. One can plug in the Grove water sensor start programming. Grove water sensor works with digital I/...

Temperature and Humidity Monitoring Notifications

Temperature and Humidity Monitoring Project with GrovePi and Hologram Nova A Temperature and Humidity Grove sensor is used in this project to measure relative humidity and temperature. It provides relative humidity measurement expressed as a percentage of the ration of moisture in the air to the maximum amount that can be held in the air at that temperature. The relative humidity changes with temperature as air becomes hotter and it holds more moisture. Things used in this project: Things used in this project: Hardware components: Raspberry Pi Zero  WH GrovePi Zero  Gove -Temperature and Humidity  Sensor Grove LCD RGB Backlight Hologram SIM Software Apps: GrovePi  Python Hologram CLI GrovePi Zero is a HAT from  Dexter Industries   that allows Grove PIR motion sensor to connect to Raspberry Pi zero with out needing soldering or breadboards. One can plug in the Grove water sensor start programming. Grove Temperature and Humid...

Raspberry Pi Setup for Voice Assistant Applications Using ChatGPT, Whisper API, gTTS and Pysstx3

  Raspberry Pi can be used for providing voice assistant capabilities by integrating with ChatGPT and Whisper APIs from OpenAI. This article shows how to set up the required libraries such as Chat GPT, Whisper API, Text-to-speech Pysttx3 etc., on Raspberry Pi for enabling voice  assistant  applications.   Hardware components Raspberry Pi Micro SD Card Power Supply USB Speaker USB Microphone Recommended for initial setup USB Mouse USB Keyboard HDMI Cable Monitor Software Apps: Python ChatGPT, Whisper, Speech Recognition, Pysttx3 libraries Raspberry pi operating system needs to be installed on a micro SD card before installing any ChatGPT based libraries. Raspberry Pi Imager running on another computer can be used to copy the operating system into the SD card.  Click on 'CHOOSE OS' button and select Raspberry Pi OS (64-bit) option and select 'WRITE' button to install the operating system on the SD card. After installing Raspberry pi os on SD card, it can be insert...