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:
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.
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 .
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).
BetMGM Launches Sports Betting at Sportsbook in Michigan - Sporting
ReplyDeleteSports 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
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
ReplyDeleteYour post is just outstanding! thanks for such a post,custom erp development in chennai