control software for Janet Zweig's public art piece to be installed at the new San Diego public library Mission Hill/Hillcrest branch
sudo pip install pyyaml
sudo pip install numpy
there is an 8GB external thumb drive automatically mounted at boot to /mnt/backup
. all of the automount settings are stored in the /etc/fstab
file. more info here
the script main.py
is set to be run automatically as a systemd service. the relevant systemd service file is located at /lib/systemd/system/scroll.service
. note that in order for the service to run successfully relative file paths cannot be used. all file paths must be absolute. the get_basepath()
function in the main.py
module is useful for setting the correct filepaths. more info on systemd services here
currently using the RasPi DS1307 RTC-I2C HAT from Nation Electronics
instructions from their website:
run sudo raspi-config
and enable I2C in "Advanced Options", then reboot
install I2C-tools:
sudo apt-get install i2c-tools
check that RTC shows up on I2C channel 68:
sudo i2cdetect -y 1
add dtoverlay=i2c-rtc,ds1307
to the bottom of /boot/config.txt:
sudo nano /boot/config.txt
add rtc-ds1307
to /etc/modules:
sudo nano /etc/modules
comment out 3 lines from /lib/udev/hwclock-set:
sudo nano /lib/udev/hwclock-set
# comment out these lines:
if [ -e /run/systemd/system ] ; then
exit 0
fi
reboot, and if the Pi is connected to the internet the current date and time should be set automatically. verify this with:
sudo hwclock -r
if not connected to the internet, first the system date must be set, and then that date must be written to the hwclock:
sudo date -s "6 OCT 2015 18:00:00"
sudo hwclock -w