sudo pip3 install ntplib
sudo pip3 install --upgrade --force-reinstall pygame
sudo apt-get update
sudo apt-get install libsdl2-mixer-2.0-0
sudo apt-get install python-rpi.gpio python3-rpi.gpio
sudo mkdir /opt/radio_reloj
copy:
clock_ticks.py
time_sync_ntp.py
telegraphic.py
sounds
to:
/opt/radio_reloj
sudo chmod -R 777 /opt/radio_reloj
python
(press tab twise) note: check avaliable python envs
open clock_ticks.service:
line 10, change: python3.7
to: your_python_env
open time_sync_ntp.service:
line 8, change: python3.7
to: your_python_env
open telegraphic.service:
line 10, change: python3.7
to: your_python_env
copy:
clock_ticks.service
time_sync_ntp.service
telegraphic.service
to:
/etc/systemd/system
sudo chmod 775 /etc/systemd/system/clock_tick.service
sudo chmod 775 /etc/systemd/system/time_sync_ntp.service
sudo chmod 775 /etc/systemd/system/telegraphic.service
sudo systemctl daemon-reload
sudo systemctl enable clock_ticks.service
sudo systemctl enable time_sync_ntp.service
sudo systemctl enable telegraphic.service
sudo systemctl start clock_ticks.service
sudo systemctl start time_sync_ntp.service
sudo systemctl start telegraphic.service
sudo systemctl status clock_ticks.service
sudo systemctl status time_sync_ntp.service
sudo systemctl status telegraphic.service
sudo shutdown -h 0
hardwire connect: (Button)
pin number 1
pin number 10
DONE