Hackster will be offline on Monday, September 30 from 8pm to 10pm PDT to perform some scheduled maintenance.
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,026
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

SURYATEJA

18 projects • 59 followers

Comments