and add your user to the group, e.g., for user "pi":
$
sudo usermod -a -G stratopi pi
Reboot:
$
sudo reboot
You will find the directory /sys/class/stratopi/ which gives you access to Strato Pi's
functionalities.
Installing the Real Time Clock software
The RTC is based on the Microchip MCP79410 module and is connected to the Raspberry
Pi via its I
2
C serial bus.
Before downloading the installation utility, you should enable I
2
C and install the “i2c-tools”
package.
To enable I
2
C, run the “raspi-config” configuration utility:
$
sudo raspi-config
Then go to “Advanced Options”, “I2C” and select “yes” to enable the I
2
C interface, then
reboot your Raspberry Pi.
To install the “i2c-tools” package:
$
sudo apt-get update
$
sudo apt-get install i2c-tools
With these prerequisite installs completed, you should download and run Strato Pi’s
installation script:
$
cd
$
wget http://sferalabs.cc/files/strato/rtc-install
$
chmod 755 rtc-install
$
sudo ./rtc-install
If the script completes with no errors, delete the installation script and reboot:
$
rm rtc-install
$
sudo reboot
Testing the Real Time Clock
Assuming you are connected to the Internet and your Pi was able to reach a public NTP
(Network Time Protocol) server, you should see the current date and time using the “date”
command:
$
date
Thu Dec 10 18:02:32 CET 2015
Also check the date and time stored in the hardware clock:
$
sudo hwclock -r
Thu 10 Dec 2015 06:03:01 PM CET -0.546570 seconds
17
Strato Pi UPS User Guide