Skip to content

Latest commit

 

History

History
104 lines (78 loc) · 3.11 KB

README.MD

File metadata and controls

104 lines (78 loc) · 3.11 KB

One Metre Plus (1m+)

A multifunctional open source sensor for bicycles based on raspberry pi.

Our recommendation

Systemd service

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

Some services to disable

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

List of services to stop & disable

  • cups & cups-browsed
  • bluetooth
  • cron

Wifi card

ip link set dev eth0 down

Unit tests

python3 -m unittest discover

Configuration .nanobashrc

export PROJECT_HOME=/home/pi/one_metre_plus
export CAPTURE_HOME=/home/pi/captures
export PYTHONPATH=$PYTHONPATH:$PROJECT_HOME

Required libraries

# version
pyserial 3.5
multiprocess 0.70.11.1
path 15.1.2
pynmea2 1.18.0
PyYAML 5.4.1

Software License


The software of One Metre Plus is licensed under the GPLv3.

3D Model License

Creative Commons License
The 3D model of One Metre Plus is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License.