Hello everyone!! Welcome to this post on Arduino LED Projects!!
Need a short introduction to what the Arduino is then click on LINK
Check out the breadboard intro right HERE
So Let’s get started!!
Demo:
This is what my project looks like:
Things Required:
- Arduino UNO
- LED (any colour)
- Breadboard
- 220 ohm resistor
- KY-038 sound sensing module
- Jumper Wires
- Arduino IDE on computer
Functions Used:
- digitalRead()
- digitalWrite()
Reference Material:
I used the following (LINK) as a reference.
Code:
int led=9;
int sound=10;
int j=0;
void setup() {
// put your setup code here, to run once:
pinMode(led, OUTPUT);
pinMode(sound, INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
if(digitalRead(sound)==HIGH){
j++;
}
if(j%2==0){
digitalWrite(led, LOW);
}
if(j%2!=0){
digitalWrite(led,HIGH);
}
}
Stay Tuned for upcoming posts on Arduino Projects! We’re on the basic newbie projects right now and slowly, gradually move on to those cool, ultra techy projects!! Want to be the first to know when a new and amazing post comes up?? Then feel free to subscribe!
Happy Learning!!
