#define pin2 2
#define pin3 3
void setup() {
// put your setup code here, to run once:
pinMode(2,INPUT);
pinMode(3,OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
if(digitalRead(PIN2)==1){digitalWrite(3,HIGH);
delay(1000);
digitalWrite(3,LOW);
delay(1000);
digitalWrite(3,LOW);
delay(1000),
digitalWrite(3,LOW);
delay(1000);}else{ digitalWrite(3,LOW);
}}
2 Comments
bro code is wrong
ReplyDeleteCode do
Delete