- via relay, switch AMP on
The piface I believe already has relays on board so you simply need to connect the 2 wires to the relay terminals , one you connect to common the other to the normally open contact, then when you activate the relay the amp will be turned on.
- play wav file for 15 seconds to replace the current bell sound
you can play a wav file with aplay which is installed on raspbian by default, at the command line like this "aplay somewavefile.wav" if you wave file is 15 seconds long then then it will play for 15 seconds
- via relay, switch AMP off
see switch on above
- repeat during school brakes Monday to Friday (10am, 12pm, 3pm etc etc)
you can run programs to a schedule using cron
so for example using crontabe -e
you would enter this line for the 10am playing.
Code: Select all
0 10 * * 1-5 aplay /home/pi/name.wav
you can do the same to call the program that will activate the piface relay you simply need to have a delay in the program between turning relay on and then off again, you would call this a minute before the play command so the amp has time to power up.
this web site will help you with creating the correct cron line entries https://crontab-generator.org/