https://github.com/tompreston/spipy
A Python SPI module
https://github.com/tompreston/spipy
Last synced: 3 months ago
JSON representation
A Python SPI module
- Host: GitHub
- URL: https://github.com/tompreston/spipy
- Owner: tompreston
- License: gpl-2.0
- Created: 2013-02-05T12:57:35.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-03-06T02:16:11.000Z (about 12 years ago)
- Last Synced: 2025-01-13T15:15:38.086Z (4 months ago)
- Language: C
- Size: 161 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
[PiFace Digital IO](https://github.com/piface/pifacedigitalio) no
longer requires this module. I'm leaving it here in case anyone finds
it useful. You can write to SPI directly from within Python 3.[Here](https://github.com/lthiery/SPI-Py) is another version by someone
else.spipy
=====
A Python SPI moduleInstallation
============
$ sudo python setup.py installExamples
========
$ python
>>> import spipy
>>> s = spipy.SPI(0, 0) # s refers to /dev/spidev0.0
>>> s.transfer((1, 2, 3)) # transfer three bytes
(0, 0, 0) # method returns three bytes (SPI is duplex)