Skip to content

Commit 41af0e2

Browse files
committed
Add basic README
1 parent 9d7bfd9 commit 41af0e2

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# python-spi
2+
3+
**Note:** python-spi is still a work in progress.
4+
5+
## Overview
6+
7+
A pure Python SPI interface using the Linux spidev device
8+
9+
## Features
10+
11+
- Pure Python implementation. No C module to compile.
12+
- Supports half-duplex reads and writes as well as full-duplex transfers.
13+
- Exposes all available spidev interface options as properties.
14+
15+
## Example
16+
17+
import spi
18+
spi = SPI("/dev/spidev1.0")
19+
spi.mode = SPI.MODE_0
20+
spi.bits_per_word = 8
21+
spi.speed = 500000
22+
received = spi.transfer("\xAA\xBB\xCC")
23+
spi.write("\x00\x11\x22")
24+
received = spi.read(10)
25+
26+
27+

0 commit comments

Comments
 (0)