Skip to main content

Lib to use ADS1219 with Python on Raspberry

Project description

ADS1219_lib

ADS1219_lib is a Python library to use a ADS1219 with a Raspberry Pi. Development funded by INRAE (REVERSAAL research unit, Villeurbanne, France)

Github of the project : https://github.com/mickaelv/ADS1219-Python

Installation

You can use this command to install ADS1219_lib easily :

git clone https://github.com/mickaelv/ADS1219-Python && cd ADS1219-Python && python3 setup.py install

Soon on pip Use the package manager pip to install ADS1219_lib :

pip install ADS1219_lib 

Usage

from ADS1219_lib import ADS1219
#
#Create a new object with interupt pin on GPIO 4
ads =  ADS1219( 1, 0x40, 4 )
#
#Set an external voltage reference of 2V
ads.setExternalReference( 2 )
#
#Define the gain to 4
ads.setGain( 4 )
#
#read inputs :
print( ads.convertToV( ads.readSingleEnded( 0 ) ) )
print( ads.convertToV( ads.readSingleEnded( 1 ) ) )
print( ads.convertToV( ads.readSingleEnded( 2 ) ) )
print( ads.convertToV( ads.readSingleEnded( 3 ) ) )
#
#
#Print the value of voltage between input 0 and 1
print( ads.convertToV( ads.readDifferential_0_1() ) )
#
#Print the value of voltage between input 2 and 3
print( ads.convertToV( ads.readDifferential_2_3() ) )
#
#Print the value of voltage between input 1 and 2
print( ads.convertToV( ads.readDifferential_1_2() ) )

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ADS1219_lib-0.0.2.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

ADS1219_lib-0.0.2-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file ADS1219_lib-0.0.2.tar.gz.

File metadata

  • Download URL: ADS1219_lib-0.0.2.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.21.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.7.3

File hashes

Hashes for ADS1219_lib-0.0.2.tar.gz
Algorithm Hash digest
SHA256 81a030e96807dd4d885c2b180c855fb162bee92edf666aca83b6e97049ec11ff
MD5 3f7854d5b9e736a362f0c3e2a4fef117
BLAKE2b-256 0a176bf3fe24fafce0c5b54d1a3744e61a94985ae841d511b68c25ecd2bbfd00

See more details on using hashes here.

File details

Details for the file ADS1219_lib-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: ADS1219_lib-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.21.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.7.3

File hashes

Hashes for ADS1219_lib-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cfd50ec1fd0a8d4e2d27a0d056c30e044564201a238198266dd6db5934c9b7c5
MD5 6e9a422a9cd5a3ab73ffe0ab5e4926d3
BLAKE2b-256 68864b066552ea37dd7f76fc9bf25ebda99214a520fec4aa5c30326a67cfbf02

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page