Today we will be attempting to take over the world by Building A flammable gas leak sniffer using a mq-6 gas sensor with ARDUINO.
Check us out on Facebook!
Parts List:
affiliate links
AA Battery Holder (for 2 batteries)
MT3608 DC voltage step up module
Schematic:
ARDUINO Code:
#define met 3
void setup() {
// Serial.begin(9600); // 4 testing
pinMode(met,OUTPUT);
}
void loop() {
int val = analogRead(A1);
val=constrain(val,200,1000);
val=map(val,200,1000,0,255);
// Serial.println(val); // 4 testing
analogWrite(met,val);
delay(5);
}