projects
/
EVA-2020-02-2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Expand test coverage, bugfix
[EVA-2020-02-2.git]
/
library
/
enviroplus
/
gas.py
diff --git
a/library/enviroplus/gas.py
b/library/enviroplus/gas.py
index aa6ac55c62d91999134d362bdb9e0d9d206374e6..584317b6af2dd0ab5d9f2380d69cb3ce37f62bff 100644
(file)
--- 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
import RPi.GPIO as GPIO
MICS6814_HEATER_PIN = 24
-MICS6814_GAIN = 6.14
8
+MICS6814_GAIN = 6.14
4
ads1015.I2C_ADDRESS_DEFAULT = ads1015.I2C_ADDRESS_ALTERNATE
_is_setup = False
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
"""Return gas resistance for nh3/ammonia"""
setup()
return read_all().nh3
+
+
+def read_adc():
+ """Return spare ADC channel value"""
+ setup()
+ return read_all().adc