SURYATEJA
Published © Apache-2.0

Push Button Switch Module with Arduino

This uses a push button to switch on an LED (basic switch system in houses).

BeginnerFull instructions provided1.5 hours9,054
Push Button Switch Module with Arduino

Things used in this project

Story

Read more

Schematics

CONNECTIONS

Code

CODE FOR PUSH BUTTON MODULE

Arduino
int d=2;   // to store on or off value
void setup()
{pinMode(2,INPUT);
pinMode(13,OUTPUT);

}
void loop()
{
d=digitalRead(2);
if(d==0)
{digitalWrite(13,HIGH);}
else
{digitalWrite(13,LOW);}
}

Credits

SURYATEJA
18 projects • 59 followers
Contact

Comments

Please log in or sign up to comment.