-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nh3 support #167
Nh3 support #167
Conversation
@@ -977,21 +988,53 @@ void Sensors::GCJA5Read() { | |||
|
|||
|
|||
void Sensors::DFRobotGravityRead() { | |||
String gastype = dfr_gas.queryGasType(); | |||
|
|||
DFRobot_GAS_I2C dfr_co(&Wire,0x74); { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Esa linea deberia ser parte del init no del read.
* gas.OFF:turn off | ||
*/ | ||
gas.setTempCompensation(gas.ON); | ||
DFRobot_GAS_I2C dfr_nh3(&Wire,0x77); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dfr_nh3 debe ser global, aqui esta siendo local, y por ello, al no ser global el read fallaria.
@@ -213,8 +213,9 @@ class Sensors { | |||
PM1006 *pm1006; | |||
|
|||
// DFRobot gravity Gas sensor | |||
DFRobot_GAS_I2C dfr_gas; | |||
|
|||
//DFRobot_GAS_I2C dfr_gas; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
es el mismo objeto, no necesitamos dos, con uno basta. Debemos es usar los llamados especificos para unidad, para asi tener las dos unidades
Falla la lectura de los sensores NH3 y CO.