In this project, we will show how to use Arduino and MQ5 gas sensor to detect smoke and gas.
2)Parts and devices：
1 x ardunio UNO（or Arduino mega2560）
1 x USB cable
1 x MQ-5 Gas sensor
1 x LED
4) Sample code download link as following：
Unzip the downloaded file and upload it into Arduino.
When you put a gas lighter close to sensor，the LED will flash， serial window in arduino IDE will show “dangerous”；If you remove gas lighter from sensor，LED will turn off and serial window will show “NO dangerous”. See following pictures:
You must be logged in to post a comment