Pollution Sensor workshop

From (art)scienceblr
Revision as of 12:33, 16 December 2019 by Sushil (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Pollution Sensor

Wiring the Sensor to the Arduino Uno

First connect the vcc and ground pin from the sensor to the 5V pin and ground on the Arduino respectively. Connect the Ao(analog output) pin from the sensor to the A0(Analog input) pin on the Arduino board.

Coding

  • Open the Arduino IDE on your computer.
  • Go to sketch
  • Go to include libraries
  • Open manage libraries
  • Search for the mq2unifiedsensor and install
  • Go to examples and open the mq2unifidesensor example for the mq2 sensor.
  • // out the useless data on the code.
  • Upload the code
  • open serial monitor/plotter.