# Enviro+ ADS1015 error ADC pin reading

**URL:** https://forums.pimoroni.com/t/enviro-ads1015-error-adc-pin-reading/11711
**Category:** Support
**Created:** [September 23, 2019, 10:01pm UTC](https://forums.pimoroni.com/t/enviro-ads1015-error-adc-pin-reading/11711 "2019-09-23T22:01:54Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![kflmiami420](https://avatars.discourse-cdn.com/v4/letter/k/8baadc/32.png) [@kflmiami420](https://forums.pimoroni.com/u/kflmiami420)
#### Post date: [September 23, 2019, 10:01pm UTC](https://forums.pimoroni.com/t/enviro-ads1015-error-adc-pin-reading/11711/1 "2019-09-23T22:01:54Z")

</div>

Hello I am trying to read the ADC pin on the Enviro + board

Right now the all-in-one-no-pm-2.py is running fine with added modes for temp and press conversion.

I wanted to add a new mode to display data from the ADC pin , I read that it is a ADC1015 on 0x49 address.

I installed pimoroni git ADC1015 library [GitHub - pimoroni/ads1015-python: Python library for the Pimoroni ADS1015 breakout](https://github.com/pimoroni/ads1015-python) since it the same chip.

But when I try to run the example read-all.py it gives me an error

> pi@raspberrypize6:~/ads1015-python/examples $ ls  
> read-all.py  
> pi@raspberrypize6:~/ads1015-python/examples $ python read-all.py  
> read-all.py - read all three inputs of the ADC

Press Ctrl+C to exit!

Traceback (most recent call last):  
File “read-all.py”, line 13, in   
ads1015.set\_mode(‘single’)  
File “build/bdist.linux-armv6l/egg/ads1015/ **init**.py”, line 166, in set\_mode  
File “build/bdist.linux-armv6l/egg/i2cdevice/ **init**.py”, line 215, in set  
File “build/bdist.linux-armv6l/egg/i2cdevice/ **init**.py”, line 183, in read\_register  
File “build/bdist.linux-armv6l/egg/i2cdevice/ **init**.py”, line 283, in \_i2c\_read  
IOError: [Errno 121] Remote I/O error  
pi@raspberrypize6:~/ads1015-python/examples $

> Blockquote

this is the code I am running

#!/usr/bin/env python  
import time  
from ads1015 import ADS1015

CHANNELS = [‘in0/ref’, ‘in1/ref’, ‘in2/ref’]

print(“”"read-all.py - read all three inputs of the ADC

Press Ctrl+C to exit!  
“”")

ads1015 = ADS1015()  
ads1015.set\_mode(‘single’)  
ads1015.set\_programmable\_gain(2.048)  
ads1015.set\_sample\_rate(1600)

reference = ads1015.get\_reference\_voltage()

print(“Reference voltage: {:6.3f}v \n”.format(reference))

try:  
while True:  
for channel in CHANNELS:  
value = ads1015.get\_compensated\_voltage(channel=channel, reference\_voltage=reference)  
print(“{}: {:6.3f}v”.format(channel, value))

```
    print("")
    time.sleep(0.5)

```

except KeyboardInterrupt:  
pass

Any ideas how to fix it . The signal I am inputing into the ADC pin is from .02volts to 2.0 volts from an adafruit/1733 anemometer power from an external 12volt powersupply blue wire to pin ADC brown wire to Positive powersupply Black to negative power supply.

---

<div class="post-metadata">

### Author: ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)
#### Post date: [September 23, 2019, 10:21pm UTC](https://forums.pimoroni.com/t/enviro-ads1015-error-adc-pin-reading/11711/2 "2019-09-23T22:21:02Z")

</div>

The Enviro+ product page lists it as follows  
ADS1015 analog to digital converter (ADC)

I would have thought the Enviro+ installer would install what ever is needed to get that working?  
There is an ADC.py in the examples so the required software should have already been installed by the one line installer.

> **[pimoroni/enviroplus-python](https://github.com/pimoroni/enviroplus-python/tree/master/examples)**
>
> Python library for the Enviro+ environmental monitoring board - pimoroni/enviroplus-python
