The PiFace Digital I/O module.
Project description
pifacedigitalio
===============
The PiFace Digital Input/Output module ([PyPI](https://pypi.python.org/pypi/pifacedigitalio/)).
Documentation
=============
[http://piface.github.io/pifacedigitalio/](http://piface.github.io/pifacedigitalio/)
You can also find the documentation and some examples installed at:
/usr/share/doc/python3-pifacedigitalio/
Install
=======
Make sure you are using the lastest version of Raspbian:
$ sudo apt-get update
$ sudo apt-get upgrade
Install `pifacedigitalio` (for Python 3 and 2) with the following command:
$ sudo apt-get install python{,3}-pifacedigitalio
Test by running the `blink.py` program:
$ python3 /usr/share/doc/python3-pifacedigitalio/examples/blink.py
Change Log
==========
v3.0.5
------
- Added PiFace Digital Emulator installation instructions to the docs.
v3.0.4
------
- Added deinit_board method to PiFace Digital.
- Fixed bug where digital_read and digital_write would not close SPI file
descriptor.
v3.0.3
------
- Added documentation for simplewebcontrol.py.
v3.0.2
------
- Added bus and chip_select to deinit.
v3.0.1
------
- Fixed deinit bug (fixes GitHub pifacecommon issue #6).
v3.0.0
------
- Updated for compatibility with pifacecommon v4.0.0 (which uses the MCP23S17
class).
- All occurrences of `board_num` have been replaced with `hardware_addr` which
is more appropriate.
- PiFace Digital is initialised when you instantiate the object. **You do not
need to call pifacedigitalio.init() any more unless you're using digital_read
or digital_write.**
- PiFaceDigital inherits registers from MCP23S17 so you can access all the
registers on the chip. For example GPPUP:
>>> pfd = PiFaceDigital()
>>> pfd.gppub.value = 0xff
>>> pfd.gppub.bits[4].value = 1
- InputEventListener now requires that you provide a chip object, not
a hardware_addr (board_num). This defaults to PiFaceDigital(hardware_addr=0).
- Interrupt events contain a chip object representing the calling chip instead
of the hardware_addr (board_num). You can still access the
hardware_addr (board_num) like so:
>>> def my_callback(event):
... print(event.chip.hardware_addr)
- Removed LED, Relay and Switch classes. They added arbitrary restrictions and
were not very useful. `pifacecommon.mcp23s17.MCP23S17RegisterBit` is more
appropriate.
- Updated examples to reflect new changes.
- See the docs (particularly the examples) for more information.
v2.1.0
------
- Added IODIR_FALLING_EDGE and IODIR_RISING_EDGE (pifacecommon v3.1.1).
- Added `bus` and `chip_select` optional arguments to init.
v2.0.3
------
- Interrupts now work for multiple boards.
v2.0.2
------
- Using package structure for version number file and consistency with
other PiFace modules.
- Updated docs with new install instructions.
v2.0.1
------
- Added version number to source.
v2.0.0
------
- Using new interrupt API (check the docs).
v1.2.1
------
- Supports Python 2.
- Started using semantic versioning http://semver.org/.
v1.2
------
- Started using a change log!
- Removed install.sh, everything is now handled by setup.py.
- Updated docs.
- Added some examples.
===============
The PiFace Digital Input/Output module ([PyPI](https://pypi.python.org/pypi/pifacedigitalio/)).
Documentation
=============
[http://piface.github.io/pifacedigitalio/](http://piface.github.io/pifacedigitalio/)
You can also find the documentation and some examples installed at:
/usr/share/doc/python3-pifacedigitalio/
Install
=======
Make sure you are using the lastest version of Raspbian:
$ sudo apt-get update
$ sudo apt-get upgrade
Install `pifacedigitalio` (for Python 3 and 2) with the following command:
$ sudo apt-get install python{,3}-pifacedigitalio
Test by running the `blink.py` program:
$ python3 /usr/share/doc/python3-pifacedigitalio/examples/blink.py
Change Log
==========
v3.0.5
------
- Added PiFace Digital Emulator installation instructions to the docs.
v3.0.4
------
- Added deinit_board method to PiFace Digital.
- Fixed bug where digital_read and digital_write would not close SPI file
descriptor.
v3.0.3
------
- Added documentation for simplewebcontrol.py.
v3.0.2
------
- Added bus and chip_select to deinit.
v3.0.1
------
- Fixed deinit bug (fixes GitHub pifacecommon issue #6).
v3.0.0
------
- Updated for compatibility with pifacecommon v4.0.0 (which uses the MCP23S17
class).
- All occurrences of `board_num` have been replaced with `hardware_addr` which
is more appropriate.
- PiFace Digital is initialised when you instantiate the object. **You do not
need to call pifacedigitalio.init() any more unless you're using digital_read
or digital_write.**
- PiFaceDigital inherits registers from MCP23S17 so you can access all the
registers on the chip. For example GPPUP:
>>> pfd = PiFaceDigital()
>>> pfd.gppub.value = 0xff
>>> pfd.gppub.bits[4].value = 1
- InputEventListener now requires that you provide a chip object, not
a hardware_addr (board_num). This defaults to PiFaceDigital(hardware_addr=0).
- Interrupt events contain a chip object representing the calling chip instead
of the hardware_addr (board_num). You can still access the
hardware_addr (board_num) like so:
>>> def my_callback(event):
... print(event.chip.hardware_addr)
- Removed LED, Relay and Switch classes. They added arbitrary restrictions and
were not very useful. `pifacecommon.mcp23s17.MCP23S17RegisterBit` is more
appropriate.
- Updated examples to reflect new changes.
- See the docs (particularly the examples) for more information.
v2.1.0
------
- Added IODIR_FALLING_EDGE and IODIR_RISING_EDGE (pifacecommon v3.1.1).
- Added `bus` and `chip_select` optional arguments to init.
v2.0.3
------
- Interrupts now work for multiple boards.
v2.0.2
------
- Using package structure for version number file and consistency with
other PiFace modules.
- Updated docs with new install instructions.
v2.0.1
------
- Added version number to source.
v2.0.0
------
- Using new interrupt API (check the docs).
v1.2.1
------
- Supports Python 2.
- Started using semantic versioning http://semver.org/.
v1.2
------
- Started using a change log!
- Removed install.sh, everything is now handled by setup.py.
- Updated docs.
- Added some examples.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pifacedigitalio-3.0.5.tar.gz
(17.6 kB
view details)
File details
Details for the file pifacedigitalio-3.0.5.tar.gz
.
File metadata
- Download URL: pifacedigitalio-3.0.5.tar.gz
- Upload date:
- Size: 17.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3de827cbc58df1799d464ab3dc92a2ba99c9b521dce6aa633db21d7e015d55ed |
|
MD5 | 217b75fe8867e80e5c3883474c277251 |
|
BLAKE2b-256 | 063338ff94cd74442da0f2d18241b88ebd3c8a89489ddb1d880d72a67306569c |