Software installation and configuration
All features of Strato Pi CAN are controlled via dedicated GPIO, the I2C bus, SPI lines and
a soft serial RX/TX interface to the embedded micro-controller and can be used with most
operating systems and programming languages.
The following software installation notes are based on the Raspbian operating system.
Installing the Strato Pi CAN utility
The Strato Pi CAN utility is a simple command-line script to control the buzzer, relay and
watchdog functions.
Run the following commands to download and install the Strato Pi CAN utility:
$ cd /usr/local/bin
$ sudo wget http://sferalabs.cc/files/stratopican/strato
$ sudo chmod 755 strato
You can run the utility without arguments to print its options:
$ strato
Usage: strato beep on|off|length_millis|length_millis pause_millis repeats
strato watchdog enable|disable|heartbeat|timeout
strato shutdown
strato relay on|off
All commands should be run as superuser, so always use sudo to run strato.
Installing the Strato Pi kernel module
The Strato Pi kernel module can be used to easily access Strato Pi CAN's features via
sysfs file system.
Refer to the following instructions to download and install the module or go to:
https://github.com/sfera-labs/strato-pi-kernel-module
for updated instructions, usage details and examples.
Download and install:
$ sudo apt install git raspberrypi-kernel-headers
$ git clone --depth 1 --recursive https://github.com/sfera-labs/strato-pi-
kernel-module.git
$ cd strato-pi-kernel-module
$ make
$ sudo make install
$ dtc -@ -Hepapr -I dts -O dtb -o stratopi.dtbo stratopi.dts
$ sudo cp stratopi.dtbo /boot/overlays/
Add the following line to /boot/config.txt:
dtoverlay=stratopi
Optionally, to be able to use the sysfs files not as super user, create a new group "stratopi"
and set it as the module owner group by adding an udev rule:
$ sudo groupadd stratopi
$ sudo cp 99-stratopi.rules /etc/udev/rules.d/
15
Strato Pi CAN User Guide
Need help?
Do you have a question about the Strato Pi CAN SPBC12X and is the answer not in the manual?