Skip to content

microraptor/led-clock-station

Repository files navigation

Clock Station for the Raspberry Pi

Install prerequisites

See README_driver_libraries.md for instructions to install dependencies.

Python libraries needed:

sudo apt-get install python-daemon python-pip

Usage

sudo python clock_station_daemon.py start
sudo python clock_station_daemon.py stop

To start the daemon at system start via init.d script, save the file clock_station.py as /share/clockstation/clock_station.py on the RPI and clockstation.sh as /etc/init.d/clockstation.sh. Then install an pyhton virtaul enviroment:

sudo pip install virtualenv
sudo virtualenv --system-site-packages /usr/share/clockstation/python_venv
sudo chmod u+x /etc/init.d/clockstation.sh
sudo chkconfig clockstation.sh on
chkconfig --list

The last command should confirm that 3 and 5 of the service are turned on. Now the service starts at boot and can be also controlled with the commands:

sudo service clockstation.sh start
sudo service clockstation.sh restart
sudo service clockstation.sh stop

Sync script

A batch sync script is included, which syncs a file directly to the /usr/share/clockstation/ folder of the RPI. Before it can be used winscp.com has to be in the folder _%USERPROFILE%\SSH_ and a session named syncRPI has to be saved in WinSCP or the script has to be adjusted.

Create folder and give write permissions for syncing:
(Note: This gives the system a small security vulnerability, if all users have write permissions and the script starts at boot)

sudo mkdir /usr/share/clockstation/
sudo +w /usr/share/clockstation/

Usage

sync [filename] [optional-subdirectory]

for Powershell:

cmd /c sync [filename] [subdirectory]

Or just used the Build package, if you are using the Atom Editor.

Notes

I am using a Raspberry Pi Revision 1 (early preordered RPI) for this projects and the pins and ports are slightly different than the later Revisions.

License

The MIT License (MIT)
Copyright (c) 2016 Till

About

A sensor and display station featuring a LED clock written for a RPI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published