PiPyADC
Python module for interfacing Texas Instruments ADS1255 and ADS1256 SPI bus based analog-to-digital converters with the Raspberry Pi.
This is a Python-based implementation using the pigpio Python interface to access the Raspberry Pi hardware through the pigpio system service.
On a Raspberry Pi 3, multi-channel ADC reads require a time overhead in the order of one millisecond per sample which makes this library suitable for low-speed, high resolution data acquisition.
As the ADS125x devices feature a sophisticated, configurable, hardware-based down-sampling filter, there is no penalty in terms of accuracy.
NEW in version 2:
- Uses the pigpio API instead of the deprecated wiringpi library
- Using pgpio, the user scripts do not have to be run as root any more
- Working implementation for multiple ADS125x devices on the same SPI bus
- Proper configuration of unused chip-select line for the Waveshare example
Since version 2.1:
- ADS1256 now supports the Python with statement by acting as a Context Manager, allowing for automatic clean-up of SPI device and pigpio resources at exit. (See waveshare_example.py)
- Many bug-fixes involving initialisation and clean-up and running multiple devices on the same SPI bus
Limitation:
- Same as for version 1: This does not feature high-speed or low delays
Download: https://github.com/ul-gh/PiPyADC
Documentation of pigpio library: https://abyz.me.uk/rpi/pigpio/python.html
Uses code from: https://github.com/heathsd/PyADS1256
License: GNU LGPLv2.1, see: https://www.gnu.org/licenses/old-licenses/lgpl-2.1-standalone.html
Ulrich Lukas, 2022-08-30
Run example on Raspberry Pi OS:
Install:
# numpy is optional for running the Isoflux hardware examples
sudo apt install python3-pip python3-numpy pigpio python3-pigpio git
pip3 install pipyadc
Enable pigpio system service (started at boot)
sudo systemctl enable pigpiod.service
Activate SPI bus and reboot system
# Using raspi-config or, alternatively, using following command:
sudo sed -E -i s/"(#)(dtparam=spi).*"/"\2=on"/ /boot/config.txt
sudo reboot
Run example:
git clone https://github.com/ul-gh/PiPyADC
cd PiPyADC/examples/waveshare_board
./waveshare_example.py
Metadata
Release files for pipyadc 2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pipyadc-2.1.tar.gz | 25.9 kB | Without provenance | Details for pipyadc-2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pipyadc-2.1-py3-none-any.whl | Python 3 | none | any | Details for pipyadc-2.1-py3-none-any.whl |
Total release size: 52.9 kB
Release files / pipyadc-2.1.tar.gz
| Download URL | pipyadc-2.1.tar.gz |
|---|---|
| Size | 25.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c4e01722ec99ee81464b1d285cfaa10b59c50156a04cc3771e45b004d7a027d9
|
|
BLAKE2b-256 checksum How to use checksums |
7748819ce5ddd8bec075c217174a64533221c3983e77a3aa11fcfaf7caedd332
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.4
|
Release files / pipyadc-2.1-py3-none-any.whl
| Download URL | pipyadc-2.1-py3-none-any.whl |
|---|---|
| Size | 27.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
21b9db4ad7545f7abe20ca69490d6bdb5d8e96fa34953eeda04c6b5b6b42808f
|
|
BLAKE2b-256 checksum How to use checksums |
3d8310994c78cff172704dafa29413426f1af25c82f0f6e354e6484eecbc90ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.4
|
Security for pipyadc 2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.