Jaminite08
Posts: 1
Joined: Mon Jan 20, 2020 10:25 pm

PA System controlled by Alarm Panel

Mon Jan 20, 2020 10:50 pm

Good Evening Everybody,

I am looking for some guidance on a project that I am doing...

We currently have a alarm panel that arms our building and when we the arm building we want a PA message to play. The way we plan on setting this up is when the Alarm Panel is armed it will send a signal to relay switch that is connected to the pi. The pi will be connected to a amp to play the message across the pa system. I am looking for recommendations on everything. We already have a PI 3 model B 1 ram. We are using python and will attach the code I have programmed thus far. Please let me know what products that we will need and let me know if there is a better way to code.

Code: Select all

from gpiozero import Button
import pygame

pygame.init()

btn=Button(17)

broadcast=pygame.mixer.Sound('/home/pi/folder/filename.wav')

def audio():
	print("audio)
	broadcast.play()

btn.when_pressed = audio 
Thank you in advance for your assistance,

Jaminite

Return to “Automation, sensing and robotics”