- Automating my NFT (Nutrient Film Technique) driven greenhouse
- 3rd iteration made with Raspberry Pi 5 & C++ on Raspberry Pi OS
- See previous (2nd version) on Raspberry Pico in https://github.com/visuve/SykeroLabs2
- See Sykerolabs 3 wiki for technical illustrations and pictures i.e. the full documentation
- The documentation below is only for building, debugging etc. the application itself
- Sykerolabs3 uses CMake you need to install it first
- You can use GCC or Clang on your Raspberry Pi
- Note that GCC is installed by default on Raspberry Pi OS and the Clang builds have not been tested
- See examples in ubuntu.yml on how to build the project
- At the moment Sykerolabs uses no other than C++ standard libraries, i.e. there are no dependencies
- I use Visual Studio with the "Linux and embedded development with C++" workload
- Sometimes I use Windows Subsystem for Linux (WSL) when developing stuff that does not need GPIO related things
- The application produces CSV data of the states of the attached relays & probes
- On release builds the data goes into timestamped files in
~/sykerolabs
and on debug builds the data is printed to console
- On release builds the data goes into timestamped files in
- The application also produces event logs which can be viewed with
journalctl -f -t sykerolabs
for debugging purposes- Assuming you use systemd on the target OS (which is default on the Raspberry Pi OS)...
- See https://www.freedesktop.org/software/systemd/man/latest/journalctl.html for more details
- Once you are done with your changes, run cmake install target
- NOTE: you do not need sudo or root. Sykerolabs should be run as a regular user
- See build section and then
cmake --install
- CMake will copy the executable in the users home directory and the sykerolabs.service to
~/.config/systemd/user/
which is a user specific systemd unit directory- See https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html for more details
- To take the service unit into use you need to run
systemctl --user daemon-reload
for systemd re/load the sykerolabs.servicesystemctl --user start sykerolabs.service
to start the servicesystemctl --user status sykerolabs.service
to check the statussystemctl --user enable sykerolabs.service
to enable on boot (assuming the status is okay)systemctl --user stop sykerolabs.service
to stop the service if neededsystemctl --user disable sykerolabs.service
to disable the service on boot
- IMPORTANT: run
sudo loginctl enable-linger $USER
for systemd not to kill the service after logout!