A multifunctional open source sensor for bicycles based on raspberry pi.
To start the program after login, we use systemd to manage the python main script.
You must create a file with the following configuration accordingly with your setup.
| IMPORTANT: The log files must be created before the start/enabling of the service. The service does not generate the files.
# ~/.config/systemd/user/capture.service
[Unit]
Description=Capture service
[Service]
Type=simple
WorkingDirectory=/home/pi
ExecStart=/usr/bin/python3 main.py
StandardOutput=append:/home/pi/info.log
StandardError=append:/home/pi/error.log
Restart=always
RestartSec=1
[Install]
WantedBy=default.target
Alias=capture.service
Configuration logs
systemctl --user daemon-reload
systemctl --user enable capture.service
systemctl --user start capture.service
systemctl start|stop service
systemctl enable|disable service
systemctl list-units --type=service
#Example: Stop bluetooth
systemctl status bluetooth.service
systemctl stop bluetooth.service
systemctl disable bluetooth.service
# Disable wifi, bluetooth
systemctl disable wpa_supplicant
systemctl disable bluetooth
systemctl disable hciuart
- cups & cups-browsed
- bluetooth
- cron
ip link set dev eth0 down
python3 -m unittest discover
export PROJECT_HOME=/home/pi/one_metre_plus
export CAPTURE_HOME=/home/pi/captures
export PYTHONPATH=$PYTHONPATH:$PROJECT_HOME
# | version |
---|---|
pyserial | 3.5 |
multiprocess | 0.70.11.1 |
path | 15.1.2 |
pynmea2 | 1.18.0 |
PyYAML | 5.4.1 |
The software of One Metre Plus is licensed under the GPLv3.
The 3D model of One Metre Plus is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License.