Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update README.md
Fixed example code.
shantanoo authored Mar 17, 2021
commit 21173ddf669099bcaef1d7597c6ba217bc8f8ad5
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -21,11 +21,11 @@ This is a fork of https://github.com/tomstokes/python-spi which seems to be aban
## Example
```python3
import spi
spi = SPI("/dev/spidev1.0")
spi.mode = SPI.MODE_0
spi.bits_per_word = 8
spi.speed = 500000
received = spi.transfer([0x11, 0x22, 0xFF])
spi.write([0x12, 0x34, 0xAB, 0xCD])
received = spi.read(10)
spidev = spi.SPI("/dev/spidev1.0")
spidev.mode = spi.SPI.MODE_0
spidev.bits_per_word = 8
spidev.speed = 500000
received = spidev.transfer([0x11, 0x22, 0xFF])
spidev.write([0x12, 0x34, 0xAB, 0xCD])
received = spidev.read(10)
```