Mini Breadboard:- https://amzn.to/3Ulqv3G Arduino UNO:- https://amzn.to/3mhamzG Jumper Wires:- https://amzn.to/3GvV1SW 220 Ohm Resistor:- https://amzn.to/3ZPIUXv Red, Yellow and Green LED:- https://amzn.to/3PPUbpF 9V Battery:- https://amzn.to/44mJ5Mu
Posts
Showing posts from June, 2023
Traffic Light Code
- Get link
- X
- Other Apps
void setup() { pinMode(13,OUTPUT); pinMode(12,OUTPUT); pinMode(11,OUTPUT); } void loop() { digitalWrite(13,HIGH); delay(4000); digitalWrite(13,HIGH); delay(500); digitalWrite(13,LOW); delay(500); digitalWrite(13,HIGH); delay(500); digitalWrite(13,LOW); delay(500); digitalWrite(13,HIGH); delay(500); digitalWrite(13,LOW); delay(500); digitalWrite(11,HIGH); delay(4000); digitalWrite(11,HIGH); delay(500); digitalWrite(11,LOW); delay(500); digitalWrite(11,HIGH); delay(500); digitalWrite(11,LOW); delay(500); digitalWrite(11,HIGH); delay(500); digitalWrite(11,LOW); delay(500); digitalWrite(11,HIGH); delay(500); digitalWrite(11,LOW); digitalWrite(12,HIGH); delay(2000); digitalWrite(12,LOW); delay(100); }
Materials Required for mq2 gas sensor
- Get link
- X
- Other Apps
Mini Breadboard:- https://amzn.to/3Ulqv3G Arduino UNO:- https://amzn.to/3mhamzG Jumper Wires:- https://amzn.to/3GvV1SW MQ-2 Gas Sensor:- https://amzn.to/3KHEkFt 5V Buzzer and 9V Battery:- https://amzn.to/3KkLNK9 Green-Red LED:- https://amzn.to/3nWWawe 220 Ohm Resistor:- https://amzn.to/3ZPIUXv Hookup Wire:- https://amzn.to/3nWXBuK
Arduino Code for mq2 sensor
- Get link
- X
- Other Apps
////////////////Written by "Simple Circuits"////////////////////// int Input = A0; int Buzzer = A1; int GreenLED = A2; int RedLED = A3; int value; int MAX = 600; void setup() { Serial.begin(9600); pinMode(Input ,INPUT); pinMode(RedLED ,OUTPUT); pinMode(GreenLED ,OUTPUT); pinMode(Buzzer ,OUTPUT); } void loop() { value = analogRead(A0); if (value >= MAX) { digitalWrite(GreenLED ,LOW); digitalWrite(RedLED ,HIGH); digitalWrite(Buzzer ,HIGH); delay(5000); digitalWrite(Buzzer ,LOW); delay(6000); } else { digitalWrite(RedLED ,LOW); digitalWrite(Buzzer ,LOW); digitalWrite(GreenLED ,HIGH); } }
mq2 gas sensor circuit diagram
- Get link
- X
- Other Apps
Mini Breadboard:- https://amzn.to/3Ulqv3G Arduino UNO:- https://amzn.to/3mhamzG Jumper Wires:- https://amzn.to/3GvV1SW MQ-2 Gas Sensor:- https://amzn.to/3KHEkFt 5V Buzzer and 9V Battery:- https://amzn.to/3KkLNK9 Green-Red LED:- https://amzn.to/3nWWawe 220 Ohm Resistor:- https://amzn.to/3ZPIUXv Hookup Wire:- https://amzn.to/3nWXBuK