To install Oceanix:
-
Clone the Oceanix repository:
git clone https://github.com/PoliTOcean/Oceanix.git cd Oceanix -
Source the install script:
source install.sh -
To use I2C, enable it:
- Open the Raspberry Pi configuration:
sudo raspi-config
- Navigate to
Interface Options->I2C-><Yes>to enable it. - Reboot the Raspberry Pi for the changes to take effect:
sudo reboot
- Open the Raspberry Pi configuration:
-
Automatic Execution with Systemd
To automatically start Oceanix as a service on boot, you can use systemd.
-
Create the
oceanix.servicefile in/etc/systemd/system/:sudo nano /etc/systemd/system/oceanix.service
-
Add the following content to the
oceanix.servicefile:[Unit] Description=Oceanix Service After=network.target [Service] ExecStart=/usr/bin/chrt -f 99 /home/politocean/firmware/Oceanix/build/Oceanix WorkingDirectory=/home/politocean/firmware/Oceanix/build Restart=always User=root Environment=DISPLAY=:0 CPUSchedulingPolicy=fifo CPUSchedulingPriority=99 [Install] WantedBy=multi-user.target -
Important: Verify that the
ExecStartandWorkingDirectorypaths are correct for your Oceanix installation. TheUsershould be the user that owns the Oceanix installation. -
Enable the Oceanix service:
sudo systemctl enable oceanix.service -
restart the Oceanix service:
sudo systemctl restart oceanix.service
-
Start the Oceanix service:
sudo systemctl start oceanix.service
-
Check the status of the Oceanix service:
sudo systemctl status oceanix.service
-
To stop the Oceanix service:
sudo systemctl stop oceanix.service
-
To disable the Oceanix service:
sudo systemctl disable oceanix.service