Hey guys; we make an alarm with raspberry pi, Pir sensor and a smartphone.You can use this at your home, at your room or anywhere else you want :)

Step 1: PIR

First of all; you have to connect pir to raspberry pi as the way you see in the photo.check pir's connection it can be changed over the time, better the check. vcc=5v(pin2) ,out=pin7, gnd=pin6 .

Step 2: IFTTT

and then you need to use www.ifttt.com and create a new applet. Go to maker settings , copy and go on that url.

Step 3: Command Line

then coppy and paste curl code (curl -X POST https://maker.ifttt.com/trigger/room/with/key/YourKey) to raspberry's command line.and you can see "Congratulations! You've fired the detected event".

Step 4: Python 3

last step is your python code.


import RPi.GPIO as GPIO

import requests

import time



GPIO.setup(7, GPIO.IN)

GPIO.setup(16, GPIO.OUT)

while True:


if i==0:

print ("No one")


if i==1:

print ("someone is detected")




if this will not wok try to create a new applet and apply steps again.Good luck :)

I love it
Good job...
incredible ??
<p>Santa has special power for pır :)</p>
<p>Last year I used this kind of a motion sensor alarm to make a motion activate Santa alarm with my kids. Unfortunately old Saint Nick avoided capture once again. </p>

About This Instructable




More by isenkaya:Pır sensor+Raspberry pi+IFTTT 
Add instructable to: