Difference between revisions of "Pollution Sensor workshop"

From (art)scienceblr
Jump to: navigation, search
(Created page with " Pollution Sensor ==Pollution Sensor== ===Wiring the Sensor to the Arduino Uno=== First connect the vcc and ground pin from the sensor to the 5V pin an...")
 
(No difference)

Latest revision as of 07:03, 16 December 2019


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.