Software installation and configuration
All features of Strato Pi Base are controlled via dedicated GPIO, the I
2
C bus 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 utility on Raspbian
The Strato Pi utility is a simple command-line script to control Strato Pi’s buzzer and
watchdog functions.
Run the following commands to download and install the Strato Pi utility:
$
cd /usr/local/bin
$
sudo wget http://sferalabs.cc/files/strato/strato
$
sudo chmod 755 strato
You can run the Strato Pi 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 battery
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 all of Strato Pi CM Duo control
features via a sysfs file system.
Run the following commands to download and install the Strato Pi kernel module (see
https://github.com/sfera-labs/strato-pi-kernel-module for detailed installation instructions):
$ sudo apt-get install git-core
$ git clone --recursive https://github.com/sfera-labs/strato-pi-kernel-
module.git
$ sudo apt-get install raspberrypi-kernel-headers
$ cd strato-pi-kernel-module
$ make
$ sudo make install
To have the module automatically loaded at boot add stratopi in /etc/modules:
$ sudo sh -c "echo 'stratopi' >> /etc/modules"
Optionally, to be able to use the /sys/ 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/
Then add your users to the group, e.g., for user "pi", and reboot:
$ sudo usermod -a -G stratopi pi
16
Strato Pi Base User Guide
Содержание SPBB30X
Страница 26: ...35C AMBIENT TEMPERATURE LOW CPU LOAD 35C AMBIENT TEMPERATURE HIGH CPU LOAD 25 Strato Pi Base User Guide...
Страница 27: ...45C AMBIENT TEMPERATURE LOW CPU LOAD 45C AMBIENT TEMPERATURE HIGH CPU LOAD 26 Strato Pi Base User Guide...
Страница 28: ...Block diagram STRATO PI BASE BLOCK DIAGRAM 27 Strato Pi Base User Guide...
Страница 31: ...Dimensions DIMENSIONS mm 30 Strato Pi Base User Guide...