void setup() {
// put your setup code here, to run once:
pinMode(12, INPUT);
pinMode(21, OUTPUT);
}
void loop() {
int x = digitalRead(12);
if(x == 1){
digitalWrite(21, HIGH);
}else {
digitalWrite(21, LOW);
}
}
void setup() {
// put your setup code here, to run once:
pinMode(12, INPUT);
pinMode(21, OUTPUT);
}
void loop() {
int x = digitalRead(12);
if(x == 1){
digitalWrite(21, HIGH);
}else {
digitalWrite(21, LOW);
}
}