Skip to content

Commit

Permalink
updated docs to detail included examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Preston committed Nov 15, 2013
1 parent 79d3cdf commit 916331f
Show file tree
Hide file tree
Showing 5 changed files with 134 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Change Log
==========

v2.0.6
------
- Added reference to examples location after installation instructions.
- Added included examples section in docs.

v2.0.5
------
- Fixed a bug in LCDQuestion.
Expand Down
126 changes: 126 additions & 0 deletions docs/included_examples.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
Included Examples
=================
The PiFace Control and Display Python libraries include some example programs
at ``/usr/share/doc/python3-pifacecad/examples/``. You are encouraged to
modify and improve them.

You can also find the examples on `GitHub <https://github.com/piface/pifacecad/tree/master/examples>`_.

.. note:: Some of the included examples are zipped (`.gz`) and require
unzipping before they can be used.

Internet Radio
--------------
An internet radio with IR remote control features.

.. note:: In order to use the infrared remote control features of the radio
you must first `configure LIRC </lirc.html>`_.

The internet radio requires the program ``mplayer`` to be installed in order to
play audio streams. Install it with::

$ sudo apt-get install mplayer

Unzip the radio::

$ gunzip /usr/share/doc/python3-pifacecad/examples/radio.py.gz

Run the radio::

$ python3 /usr/share/doc/python3-pifacecad/examples/radio.py

================ ==================
Button Function
================ ==================
Navigation left Previous station
Navigation right Next station
Navigation in Stop/Start playing
Control 0 Station Preset 0
Control 1 Station Preset 1
Control 2 Station Preset 2
Control 3 Station Preset 3
Control 4 Exit
================ ==================

Hangman
-------
A game of hangman. Guess which letters are in the word. To many incorrect
guesses and, well, you know the rest.

Unzip and run hangman::

$ gunzip /usr/share/doc/python3-pifacecad/examples/radio.py.gz
$ python3 /usr/share/doc/python3-pifacecad/examples/radio.py

================ =========================
Button Function
================ =========================
Navigation left Move cursor/Change letter
Navigation right Move cursor/Change letter
Navigation in Change mode/enter
================ =========================

See hangman in action on `YouTube <http://youtu.be/XAM5vru8ffY>`_.

Traintimes
----------
Shows UK train times from Manchester Picadilly (MAN) to various other stations.
Have a peek at the code to the alter which station you are departing from.

``traintimes.py`` depends on `Beautiful Soup 4 <http://www.crummy.com/software/BeautifulSoup/>`_. Install it with::

$ sudo apt-get install python3-bs4

Then unzip and run traintimes::

$ gunzip /usr/share/doc/python3-pifacecad/examples/traintimes.py.gz
$ python3 /usr/share/doc/python3-pifacecad/examples/traintimes.py

================ ============================
Button Function
================ ============================
Navigation left Previous destination station
Navigation right Next destination station
Navigation in Refresh
Control 4 Exit
================ ============================

Tweets
------
Shows latest tweets.

Twitter requires the `Python Twitter Tools <http://mike.verdone.ca/twitter/>`_
module to be installed::

$ sudo apt-get install easy_install3
$ sudo easy_install3 twitter

Unzip and run tweets::

$ gunzip /usr/share/doc/python3-pifacecad/examples/tweets.py.gz
$ python3 /usr/share/doc/python3-pifacecad/examples/tweets.py

================ ==============
Button Function
================ ==============
Navigation left Previous tweet
Navigation right Next tweet
Navigation in Refresh
Control 4 Exit
================ ==============

Weather
-------
Shows current weather information. Unzip and run weather::

$ gunzip /usr/share/doc/python3-pifacecad/examples/weather.py.gz
$ python3 /usr/share/doc/python3-pifacecad/examples/weather.py

================ =================
Button Function
================ =================
Navigation left Previous location
Navigation right Next location
Navigation in Refresh
Control 4 Exit
================ =================
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Contents:

installation
example
included_examples
creating_custom_bitmaps
tools
lirc
Expand Down
2 changes: 1 addition & 1 deletion docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Test by running the ``sysinfo.py`` program::

$ python3 /usr/share/doc/python3-pifacecad/examples/sysinfo.py

You will need to `configure the IR receiver <lirc.html#setting-up-the-infrared-receiver>`_ yourself.
You will need to `configure the IR receiver <lirc.html#setting-up-the-infrared-receiver>`_ yourself. More examples can be found in `/usr/share/doc/python3-pifacecad/examples/` (which may need unzipping using `gunzip`).

SysInfo Service
===============
Expand Down
2 changes: 1 addition & 1 deletion pifacecad/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '2.0.5'
__version__ = '2.0.6'

0 comments on commit 916331f

Please sign in to comment.