Comments (3)
Hi tbmart16,
This code works for me:
#include <MQ131.h>
MQ131Class highSensor = new MQ131Class(8000); # Load resistance RL of 8kOhms (8000 Ohms)
MQ131Class lowSensor = new MQ131Class(1000000); # Looad resistance RL of 1MOhms (1000000 Ohms)
void setup() {
Serial.begin(115200);
highSensor.begin(2,A0, HIGH_CONCENTRATION, 8000, (Stream *)&Serial);
[...]
from arduino-mq131-driver.
As you can see in the header file, the sensor is created through the instance of MQ131Class
.
In order to have multiple instance of the driver, you just have to instantiate the class more than once.
Per example:
MQ131Class lowSensor = new MQ131Class();
MQ131Class highSensor = new MQ131Class();
lowSensor->begin(...);
highSensor->begin(...);
[...]
from arduino-mq131-driver.
Hi ostaquet,
I have a similar goal of using both a high concentration and low concentration sensor in my program. I see your response above and I tried to implement it into my Arduino code, but I get an error. Should I put your example above before the void setup() or inside of the void setup()?
from arduino-mq131-driver.
Related Issues (20)
- Mixed up formulas in the environmental correction ratio HOT 3
- Collection of data points in the data sheet to define equation HOT 1
- MQ131 analog out less than 1V HOT 1
- doesn't print correctly HOT 1
- Ozone Analyser (03) HOT 1
- Additional processing during the heating/reading process HOT 1
- live data HOT 1
- PPB values HOT 1
- confusing wiring diagram HOT 3
- MQ131 and ESP32 HOT 4
- high concentration mq131 HOT 1
- MQ131 module.
- Ground connection in schematics HOT 1
- Load resistance with 3.3V microcontroller HOT 1
- Unusual Sensor Reading HOT 3
- Low Concentration Qualitative Detection MQ131 with ESP32 HOT 2
- Wrong Readings PPB HOT 1
- Always on? HOT 1
- control temperature HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduino-mq131-driver.