An app to record audio guest book entries with a retro phone.
This section explains how to manage the wedding-phone.service
using systemctl.
Clone this repository to your Raspberry Pi. And setup a new service file.
sudo nano /etc/systemd/system/wedding-phone.service
Add the following content to the service file and make sure to change the ExecStart
line to point to the location of run.py
on your Pi.
[Unit]
Description=Run Python Script on Boot
After=network.target
[Service]
ExecStart=/usr/bin/python3 /home/wedding/Development/phone-guest-book/run.py
WorkingDirectory=/home/wedding/Development/gpio-test
StandardOutput=inherit
StandardError=inherit
Restart=always
User=wedding
[Install]
WantedBy=multi-user.target
Connect the receiver pins to the GPIO pins as follows:
- GPIO 4 --> Pull-down resistor (10kΩ) --> GND
- GPIO 4 --> switch side 1
- switch side 2 --> 3.3V
Use a USB Sound Card to connect the reciever microphone and speaker.
For example the Icy Box IB-AC527
To start the wedding-phone service, use the following command:
sudo systemctl start wedding-phone.service
To stop the wedding-phone service, use the following command:
sudo systemctl stop wedding-phone.service
To check the status of the wedding-phone service, use the following command:
sudo systemctl status wedding-phone.service
To enable the wedding-phone service to start automatically on boot, use the following command:
sudo systemctl enable wedding-phone.service
To disable the wedding-phone service from starting automatically on boot, use the following command:
sudo systemctl disable wedding-phone.service
If you need to make changes to the script, remember to restart the service:
sudo systemctl restart wedding-phone.service
To view the logs of the wedding-phone service, use the following command:
sudo journalctl -u wedding-phone.service
The code is licensed under the MIT License