py3-spidev
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (8.8%) to scientific vocabulary
Repository
Basic Info
Statistics
- Stars: 466
- Watchers: 29
- Forks: 205
- Open Issues: 48
- Releases: 1
Metadata Files
README.md
Python Spidev
This project contains a python module for interfacing with SPI devices from user space via the spidev linux kernel driver.
All code is MIT licensed unless explicitly stated otherwise.
Usage
python
import spidev
spi = spidev.SpiDev()
spi.open(bus, device)
to_send = [0x01, 0x02, 0x03]
spi.xfer(to_send)
Settings
```python import spidev spi = spidev.SpiDev() spi.open(bus, device)
Settings (for example)
spi.maxspeedhz = 5000 spi.mode = 0b01
... ```
bits_per_wordcshighloop- Set the "SPI_LOOP" flag to enable loopback modeno_cs- Set the "SPINOCS" flag to disable use of the chip select (although the driver may still own the CS pin)lsbfirstmax_speed_hzmode- SPI mode as two bit pattern of clock polarity and phase [CPOL|CPHA], min: 0b00 = 0, max: 0b11 = 3threewire- SI/SO signals sharedread0- Read 0 bytes after transfer to lower CS if cshigh == True
Methods
open(bus, device)
Connects to the specified SPI device, opening /dev/spidev<bus>.<device>
readbytes(n)
Read n bytes from SPI device.
writebytes(list of values)
Writes a list of values to SPI device.
writebytes2(list of values)
Similar to writebytes but accepts arbitrary large lists.
If list size exceeds buffer size (which is read from /sys/module/spidev/parameters/bufsiz),
data will be split into smaller chunks and sent in multiple operations.
Also, writebytes2 understands buffer protocol
so it can accept numpy byte arrays for example without need to convert them with tolist() first.
This offers much better performance where you need to transfer frames to SPI-connected displays for instance.
xfer(list of values[, speed_hz, delay_usec, bits_per_word])
Performs an SPI transaction. Chip-select should be released and reactivated between blocks. Delay specifies the delay in usec between blocks.
xfer2(list of values[, speed_hz, delay_usec, bits_per_word])
Performs an SPI transaction. Chip-select should be held active between blocks.
xfer3(list of values[, speed_hz, delay_usec, bits_per_word])
Similar to xfer2 but accepts arbitrary large lists.
If list size exceeds buffer size (which is read from /sys/module/spidev/parameters/bufsiz),
data will be split into smaller chunks and sent in multiple operations.
close()
Disconnects from the SPI device.
Owner
- Name: Stephen Caudle
- Login: doceme
- Kind: user
- Repositories: 15
- Profile: https://github.com/doceme
GitHub Events
Total
- Issues event: 4
- Watch event: 12
- Issue comment event: 3
- Push event: 3
- Pull request event: 3
- Fork event: 2
- Create event: 1
Last Year
- Issues event: 4
- Watch event: 12
- Issue comment event: 3
- Push event: 3
- Pull request event: 3
- Fork event: 2
- Create event: 1
Committers
Last synced: about 3 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| Phil Howard | p****l@g****m | 17 |
| Stephen Caudle | s****n@c****o | 8 |
| Stephen Caudle | s****n@c****m | 5 |
| ams-tech | a****h@u****m | 4 |
| Stephen Caudle | s****e@d****m | 3 |
| Dmitry Andrianov | g****b@d****u | 2 |
| Radek Podgorny | r****k@p****z | 2 |
| Catalin Petrescu | c****u@g****m | 2 |
| Tom Dean | t****n@w****m | 1 |
| Jacob Walker | j****4@g****m | 1 |
| Jonas Zimmermann | p****t@j****e | 1 |
| Jonathon Reinhart | J****t@g****m | 1 |
| Lars Kellogg-Stedman | l****s@r****m | 1 |
| Luiz Eduardo Amaral | l****6@g****m | 1 |
| Zajcev Evgeny | z****g@y****u | 1 |
| chrillomat | c****i@c****t | 1 |
| dpslwk | d****k@g****m | 1 |
| Paul Brook | p****l@n****g | 1 |
| mk2366 | k****s@g****m | 1 |
| billmccartney | b****y@g****m | 1 |
| Bernd Kuhls | b****s@t****e | 1 |
| Phil Howard | P****l@g****m | 1 |
| Tim Wood | t****0@p****t | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 11 months ago
All Time
- Total issues: 80
- Total pull requests: 29
- Average time to close issues: 12 months
- Average time to close pull requests: 4 months
- Total issue authors: 73
- Total pull request authors: 16
- Average comments per issue: 2.93
- Average comments per pull request: 0.86
- Merged pull requests: 18
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 4
- Pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 4
- Pull request authors: 1
- Average comments per issue: 0.0
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- Gadgetoid (4)
- sophiekovalevsky (2)
- MikeD2-mnb (2)
- EricPobot (2)
- me21 (2)
- HowardALandman (1)
- sbelbin (1)
- tim-seoss (1)
- tomekki (1)
- charlesnicholson (1)
- gladk (1)
- Ouroboros75 (1)
- aronfeher (1)
- manushawijekoon (1)
- erikbgithub (1)
Pull Request Authors
- Gadgetoid (6)
- doceme (6)
- dlech (4)
- aardvarkkrill (2)
- dimas (2)
- ekerin (1)
- JonathonReinhart (1)
- dpslwk (1)
- ams-tech (1)
- mk2366 (1)
- billmccartney (1)
- cpetrescu (1)
- hugolm84 (1)
- zeeMonkeez (1)
- ksunden (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 2
-
Total downloads:
- pypi 59,628 last-month
- Total docker downloads: 5,185,105
-
Total dependent packages: 53
(may contain duplicates) -
Total dependent repositories: 1,067
(may contain duplicates) - Total versions: 10
- Total maintainers: 3
pypi.org: spidev
Python bindings for Linux SPI access through spidev
- Homepage: http://github.com/doceme/py-spidev
- Documentation: https://spidev.readthedocs.io/
- License: MIT
-
Latest release: 3.7
published about 1 year ago
Rankings
alpine-edge: py3-spidev
python module for interfacing with SPI devices from user space
- Homepage: https://github.com/doceme/py-spidev
- License: MIT
-
Latest release: 3.6-r1
published about 2 years ago