Arduino Tutorial #2 : Push Button, Buzzer, LED

preview_player
Показать описание
Arduino Uno, Breadboard, Buzzer, Push Button, Jumper Wire, LED(orange), Resistor(1k,10k ohm)

Let’s play together! Use my invite code @djhenie and complete your first Mission Egg. We’ll both earn a special gift box!

Code:

Int button = 2;
Int orangeLED = 6;
Int buzzer = 7;

void setup () {

pinMode(buzzer, OUTPUT) ;
pinMode(orangeLED, OUTPUT);
PinMode(button, INPUT);

}

void loop () {
button =digitalRead(2);

If (button ==1)
{
digitalWrite(6, HIGH);
tone(buzzer,500,200);
}
else
{
digitalWrite(6, LOW);
tone(buzzer,0,0);
}
}

You can buy arduino starter kit through " Arduino PH" Click the link below:

Please Like and Subscribe!

Thank you for Watching!

#pushbotton
#buzzer
#led
Рекомендации по теме
Комментарии
Автор

Cool Projects. I love making Arduino projects . Thanks for sharing and tutorials

xAudio
Автор

Very informative. Keep up the good work.

christiangacutan
Автор

thanks for sharing your knowledge po! more tutorials pa po..

SheeySu
Автор

What a nice thing that you shared this

maryevangelinelumagui
Автор

Hi, how about the attached GSM module if the push button will send SMS text. can you make a sample code in the video.?

davelodia
Автор

Ang ganda nmn po neto. Pa tamsak nmn po haha

edwardnamberwan
Автор

tone(buzzer, 500, 200); I didnt understand this
whats this??

selvakumarashvin
Автор

hii how can i attach with sim gsm 900 ?? can you share the coding ??

bella
Автор

Hi, where can I find the program for this one?

alqhudricalbi
Автор

Can I make the buzzer sound with a clapswitch?

lawrencecuna
Автор

hello is this possible with a pressure sensor?

sebastiannunez
Автор

int button = 2;
int orangeLED = 6;
int buzzer = 7;

void setup () {

pinMode(buzzer, OUTPUT) ;
pinMode(orangeLED, OUTPUT);
pinMode(button, INPUT);

Serial.begin(9600);
}

void loop () {
button =digitalRead(2);
Serial.println(button);
if (button == 2)
{
digitalWrite(6, HIGH);
tone(buzzer, 500, 200);
}
else
{
digitalWrite(6, LOW);
tone(buzzer, 0, 0);
}
}

AkGaming-phpu