X-Git-Url: https://zdv2.bktei.com/gitweb/EVA-2020-02-2.git/blobdiff_plain/250a3ec51e258749ed10f8727923d72f512588c7..18c9ae73f4dd170a69df03822193c3044f68f194:/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