X-Git-Url: https://zdv2.bktei.com/gitweb/EVA-2020-02-2.git/blobdiff_plain/4b18dd3abf2709cb4b5bdbbb7cdd9a85b04aaac0..97ee1d88e84df79d82c3ca20eb89378c65197f9a:/library/enviroplus/gas.py diff --git a/library/enviroplus/gas.py b/library/enviroplus/gas.py index aa6ac55..584317b 100644 --- a/library/enviroplus/gas.py +++ b/library/enviroplus/gas.py @@ -6,7 +6,7 @@ import ads1015 import RPi.GPIO as GPIO MICS6814_HEATER_PIN = 24 -MICS6814_GAIN = 6.148 +MICS6814_GAIN = 6.144 ads1015.I2C_ADDRESS_DEFAULT = ads1015.I2C_ADDRESS_ALTERNATE _is_setup = False @@ -132,3 +132,9 @@ def read_nh3(): """Return gas resistance for nh3/ammonia""" setup() return read_all().nh3 + + +def read_adc(): + """Return spare ADC channel value""" + setup() + return read_all().adc