GithubHelp home page GithubHelp logo

mq7-library's Introduction

MQ7-Library

CO (Carbon Monoxide) concentration from MQ7 sensor

The files are used to obtain parts per million (ppm) of the Carbon Monoxide gas using the analog input of the MQ7 gas sensor.

Pre requisites

The following involves the basic connection of MQ7 and Arduino board and the use of this library.

  1. Connect the Vcc and GND pins of the MQ7 sensor to the Arduino 5v and GND pin respectively.
  2. Wire the A0 (analog pin) of MQ7 sensor to any analog pin on the Arduino board.
  3. Make sure the load resistance of the MQ7 is 10k ohm. (In the MQ7 board make sure the potentiometer measures 10k ohm).
  4. Download Arduino Software.
  5. Clone or download this files and place them under \Program Files\Arduino\libraries\MQ7 folder for including them in the Arduino code.

Code

  1. Include the header file to the source code.

#include "MQ7.h"

  1. Initialize the sensor object

MQ7 mq7(A0, 5.0); // param[1] : Analog pin number, param[2] : Sensor Vcc value

  1. To find the ppm

float ppm = mq7.getPPM();

This library can be used on any Arduino or ESP boards. Just vary the param[2] based on the Vcc.

mq7-library's People

Contributors

swatish17 avatar

Stargazers

Roman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.