Δρ 3.3 Δημιουργία συναγερμού

Τι θα χρειαστούμε

  1. Breadboard
  2. Ένα PIR
  3. Τρία καλώδια Θ ? Θ
  4. Ένα Buzzer
  5. Δυο καλώδια Α – Θ

from gpiozero import MotionSensor, Buzzer
import time

pir = MotionSensor(4)
bz = Buzzer(3)
print(“Perimene na setaristei o PIR”)
pir.wait_for_no_motion()

while True:
print(“Ready”)
pir.wait_for_motion()
print(“Motion detected!”)
bz.beep(0.5, 0.25, 8)
time.sleep(3)

Δρ 3.2  Άναμμα LED σε ανίχνευση κίνησης

Δρ 3.3  Δημιουργία συναγερμού

Δρ 3.4  Δημιουργία συναγερμού 2