int aaa=4; //d4
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
pinMode(14, OUTPUT);
pinMode(aaa, INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
int a=digitalRead(aaa);
if(a==1){
digitalWrite(14, HIGH);
}
else{
digitalWrite(14, LOW);
}
delay(10); // this speeds up the simulation
}