In this library you will find eight sensors and all of them works exactly the same so that's why we are gonna use one of them. For LPG Gas Leak Detector Project I have used MQ-2 sensor which is used for detection of LPG gas. I have also used Arduino UNO board which you can simulate in Proteus using Arduino Library for Proteus. Moreover, I have also placed an LCD which will display either LPG gas Leak Detected or not. So, let's get started with LPG Gas Leak Detector using Arduino in Proteus ISIS.
Download Proteus Simulation & Code
#include <LiquidCrystal.h> // initialize the library with the numbers of the interface pins LiquidCrystal lcd(13, 12, 11, 10, 9, 8); int Gas = 7; void setup() { // set up the LCD's number of columns and rows: lcd.begin(20, 4); // Print a message to the LCD. lcd.setCursor(0,0); lcd.print("Gas Detected :"); lcd.setCursor(1,2); lcd.print("www.TheEngineering"); lcd.setCursor(4,3); lcd.print("Projects.com"); pinMode(Gas , INPUT); } void loop() { if(digitalRead(Gas) == HIGH){lcd.setCursor(14,0);lcd.print(" Yes");} if(digitalRead(Gas) == LOW){lcd.setCursor(14,0);lcd.print(" No ");} }
JLCPCB – Prototype 10 PCBs for $2 (For Any Color)
China’s Largest PCB Prototype Enterprise, 600,000+ Customers & 10,000+ Online Orders Daily
How to Get PCB Cash Coupon from JLCPCB: https://bit.ly/2GMCH9w