Introduction: Pır Sensor+Raspberry Pi+IFTTT

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 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 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")'İsHere')



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