Skip to main content

Introduction

Documentation Status Discord Build Status

Support for the ADS1x15 series of analog-to-digital converters. Available in 12-bit (ADS1015) and 16-bit (ADS1115) versions.

Installation & Dependencies

This driver depends on:

Please ensure all dependencies are available on the CircuitPython filesystem. This can be most easily achieved by downloading and installing the Adafruit library and driver bundle on your device.

Installing from PyPI

On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally from PyPI. To install for current user:

pip3 install adafruit-circuitpython-ads1x15

To install system-wide (this may be required in some cases):

sudo pip3 install adafruit-circuitpython-ads1x15

To install in a virtual environment in your current project:

mkdir project-name && cd project-name
python3 -m venv .env
source .env/bin/activate
pip3 install adafruit-circuitpython-ads1x15

Usage Example

Single Ended

import time
import board
import busio
import adafruit_ads1x15.ads1015 as ADS
from adafruit_ads1x15.analog_in import AnalogIn

# Create the I2C bus
i2c = busio.I2C(board.SCL, board.SDA)

# Create the ADC object using the I2C bus
ads = ADS.ADS1015(i2c)

# Create single-ended input on channel 0
chan = AnalogIn(ads, ADS.P0)

# Create differential input between channel 0 and 1
#chan = AnalogIn(ads, ADS.P0, ADS.P1)

print("{:>5}\t{:>5}".format('raw', 'v'))

while True:
    print("{:>5}\t{:>5.3f}".format(chan.value, chan.voltage))
    time.sleep(0.5)

Contributing

Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.

Documentation

For information on building library documentation, please check out this guide.

Release files for adafruit-circuitpython-ads1x15 2.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for adafruit-circuitpython-ads1x15 2.1.2
File Size Uploaded
adafruit-circuitpython-ads1x15-2.1.2.tar.gz 21.8 kB Details

Release files / adafruit-circuitpython-ads1x15-2.1.2.tar.gz

Download URL adafruit-circuitpython-ads1x15-2.1.2.tar.gz
Size 21.8 kB
Tags Source
SHA-256 checksum
How to use checksums
c68fb2fba00f79d5f34574e2a0304b0f3b5b388af7700f32d2e6de2117b5cef4
BLAKE2b-256 checksum
How to use checksums
f4153c3fd0dba350debbc804d78d18ca168f43b284199a1ac574b66182508333
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1

Release history Release notifications | RSS feed

3.0.5

2 release files

3.0.4

2 release files

3.0.3

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.4.4

2 release files

2.4.3

2 release files

2.4.2

2 release files

2.4.1

2 release files

2.4.0

2 release files

2.3.0

2 release files

2.2.24

2 release files

2.2.23

2 release files

2.2.22

2 release files

2.2.19

2 release files

2.2.18

2 release files

2.2.17

2 release files

2.2.15

1 release file

2.2.14

1 release file

2.2.13

1 release file

2.2.12

1 release file

2.2.11

1 release file

2.2.10

1 release file

2.2.9

1 release file

2.2.8

1 release file

2.2.7

1 release file

2.2.6

1 release file

2.2.5

1 release file

2.2.4

1 release file

2.2.3

1 release file

2.2.2

1 release file

2.2.1

1 release file

2.2.0

1 release file

2.1.3

1 release file

This release

2.1.2 This release

1 release file

2.1.1

1 release file

2.1.0

1 release file

2.0.0

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

0.5.3

1 release file

0.5.2

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.4.0

1 release file

0.3.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page