The Raspberry Pi toolkit is a somewhat Matlab compatible raspi toolkit for GNU octave.
It has local Octave set of functions for controlling a Raspberry PI as well as a server (Raspberry Pi) comonent running remotely on the Raspberry Pi.
Installation then has two components;
1. raspi tool kit installation on the computer running GNU Octave.
2. a Raspbeery pi running pigpiod with additional scripts and setup completed.
The Raspberry Pi toolkit must be installed and then loaded to be used.
It can be installed in GNU Octave directly from octave-forge, or can be installed in an off-line mode via a downloaded tarball.
NOTE The toolkit has a dependency on the instrument-control package, so it must be installed in order to successfully install the Raspberry Pi toolkit
The toolkit must be then be loaded once per each GNU Octave session in order to use its functionality.
With an internet connection available, the Raspberry Pi package can be installed from octave-raspi website using the following command within GNU Octave:
pkg install https://sourceforge.net/projects/octave-raspberrypi/files/v0.0.1/raspi-0.0.1.tar.gz/download
With the raspi toolkit package already downloaded, and in the current directory when running GNU Octave, the package can be installed using the following command within GNU Octave:
pkg install raspi-0.0.1.tar.gz
Regardless of the method of installing the Raspberry Pi toolkit, in order to use its functions, the toolkit must be loaded using the pkg load command:
pkg load raspi
The toolkit must be loaded on each GNU Octave session.
The raspi packages uses pigpio on the Raspberry Pi hardware to communicate with the board.
In order to use the raspi hardware with the toolkit, it must have the pigpiod server installed and running on the Raspberry Pi board.
The raspi toolkit is tested using the official Raspberry Pi Lite OS (https://downloads.raspberrypi.org/raspios_lite_armhf_latest), but should also work with the full version.
The image needs to be loaded to the Pi SD card and the pi booted successfully before installing the additional software required by the raspi toolkit.
The network should be configured so that access to the pi can be obtained and the ssh service enabled.
The additional software can be installed using a simple install script that comes with toolkit or can be setup manually for more control.
To use the quick set up, copy the raspi_setup_hw.sh from the pkg bin directory to the raspberry pi.
Using ssh, login to the Pi and cd to the directory on the pi that contains the setup.
Run the setup as sudo. ie: sudo ./raspi_setup_hw.sh
Reboot the Pi ie: sudo reboot
Attempt to connect to the Pi using the toolkit.
Manual setup is the list of command that are done normally using the setup script.
> sudo apt-get install pigpiod i2c-tools avahi-daemon openssh-server
> sudo raspi-config
In the interface options, enable ssh, rgpio, i2c, spi, serial
At a minimum read/write to /tmp is required.
Defaults used in the installer:
/home/pi/* u /tmp/raspi-* u * r
> systemctl enable avahi-daemon
Optionally, also set the host name in /etc/hostname, especially if more than one pi will be used.
Copy the cgi scripts from the raspi tool kit repo to /opt/pigpio/cgi/
Optionally use raspi-config to turn off startup of the GUI.