Concepts and background¶
- WCA (Word Clock Array): The center matrix, without minute-LEDs and other stuff
- WCA_WIDTH, WCA_HEIGHT: Height and width of the WCA.
- Part of the wordclock software are png-files, which need to fit to these values.
- Currently available: 11x10 png-files.
- Support for wordclocks with other resolution available (untested).
- WCD (Word Clock Display): Includes any led attached to the wordclock (such as minutes, possible/future ambilights/etc.)
- Coordinates (or: WCA-coordinates): Can be 1d or 2d, used to adress a LED on the word clock array
- Index (or: strip index): Used to adress a LED depending on the position on the LED-strip
Expanding the functionality of the wordclock¶
Remote control of the wordclock¶
The wordclock comes with a REST-API to control the major functionality of the clock.
To access the API documentation, visit:
Adding a new plugin¶
You might be interested in expanding the wordclocks functionality by adding a new plugin to the wordclock
To do so, you need to…
- Think about the name of this plugin: E.g. new_stuff
- Add a new folder new_stuff to the folder wordclock_plugins
- Create a plugin.py-file with a class plugin, which has at least the following functions implemented:
- __init__(self, config): You can use the config-object to pass data from the config-file for initialization purposes
- run(): Run the actual plugin
- For the actual implementation, you can access the provided methods of the class wordclock_display * If necessary you might extend it… ;)
- Add an icon (with resolution 11x10 pixel) for the new plugin to the directory wordclock_plugins/new_stuff/icons/11x10/logo.png
- Add optional values to the config-file under the section [plugin_new_stuff]
- Document everything properly, so that others (and maybe you as well) can later understand it… ;)
- Commit your changes using git and consider to create a pull-request at https://www.github.com/bk1285/rpi_wordclock
- Consider, that this repository uses nvie’s branching model: http://nvie.com/posts/a-successful-git-branching-model/