int ledpin =22;// define pin 10 for LED
int button =18;// define pin 5 for Push Button
int val;// Define the variable value
void setup()
{
pinMode(ledpin, OUTPUT);// define LED as output
pinMode(button, INPUT);// define button as input
}
void loop()
{
val = digitalRead(button);//Read digital pin 5 level value assign
if (val==1)// Test button is pressed
{
digitalWrite(ledpin, HIGH);
}
else
{
digitalWrite(ledpin, LOW);
}
}
esp:VIN
esp:GND.2
esp:D13
esp:D12
esp:D14
esp:D27
esp:D26
esp:D25
esp:D33
esp:D32
esp:D35
esp:D34
esp:VN
esp:VP
esp:EN
esp:3V3
esp:GND.1
esp:D15
esp:D2
esp:D4
esp:RX2
esp:TX2
esp:D5
esp:D18
esp:D19
esp:D21
esp:RX0
esp:TX0
esp:D22
esp:D23
btn1:1.l
btn1:2.l
btn1:1.r
btn1:2.r
led1:A
led1:C
r1:1
r1:2
btn2:1.l
btn2:2.l
btn2:1.r
btn2:2.r